Developer forum

Forum » CMS - Standard features » Authenticate user from URL

Authenticate user from URL

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have a project where I need to implement a feed functionality without PIM module.

I have created a page where I get the products the users have to see but I need to display that page (or render that page) in the context of the user, considering that I have some logic in the Query and also some logic for prices.

I am looking for a way to create an authentication token, much like the one that is used for PIM feeds. But I can go with other options if necessary. 

I remember there were some options in the past with a PasswordToken. My worry is that the user may forget the password at some point and reset the Password token which will render my predefined token useless.

I am using DW 9.9.8.

Thank you,

Adrian


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

You can do ?username=abc&pwtoken=[token]

And get the token from Frontend.LogonHandler.GetLoginToken where you pass in the password token (AccessUserPassword field in database). So it is a token of a token.

And do not do this at all if you have passwords in clear text in the database.

BR Nicolai

Votes for this answer: 1
 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Thank you.

That's what I did so far and no, we don't have passwords in clear text.

My worry was related to the value of the token being changed upon any "forgot password" request.

In some cases, the "consumers" of the feed will define the link or credentials in their system for an automated retrieval of the feed content.

That's why I was wondering if the token I am offering will be affected by a new "forgot password" request.

Thank you,
Adrian

 
Nicolai Pedersen
Reply

Sorry, yes it will

 

You must be logged in to post in the forum