custom operation on validating user identity

Posted by Community Admin on 03-Aug-2018 01:41

custom operation on validating user identity

All Replies

Posted by Community Admin on 18-Mar-2011 00:00

Hi

When logging, I wanna be able to look for some information after validating the identity of the user ans save it to the Session object.
How could this be done ?
should I develop my own UC or the one in SF could be useful with some customization
thanks

Posted by Community Admin on 18-Mar-2011 00:00

Hi Bassem,

You can override LoginForm_Authenticate method of  Telerik.Sitefinity.Web.UI.PublicControls.LoginControl and then check if the user is authenticated if(!e.Authenticated)

Best wishes,
Ivan Dimitrov
the Telerik team

Posted by Community Admin on 18-Mar-2011 00:00

Hi Ivan 
Thank you for the response, 
where can I override this LoginForm_Authenticate method of  Telerik.Sitefinity.Web.UI.PublicControls.LoginControl : 
I should use a UC that uses Telerik.Sitefinity.Web.UI.PublicControls.LoginControl because I cannot see it in my RadControls toolbox in VS. 

thank you

Posted by Community Admin on 18-Mar-2011 00:00

Hello Bassem,

You need a custom class that inherits from Telerik.Sitefinity.Web.UI.PublicControls.LoginControl

Kind regards,
Ivan Dimitrov
the Telerik team

Posted by Community Admin on 18-Mar-2011 00:00

Can you show me an example?

Thansk, ~Pik

Posted by Community Admin on 19-Mar-2011 00:00

Here is my sample code, not sure why the Response.Redirect is not working.
  void Login1_Authenticate(object sender, AuthenticateEventArgs e)
 
        bool x;
        x = UserManager.GetManager().ValidateUser("username1","userpw");

        if (x.Equals(true))
       
            Response.Redirect("~/login/select/");
       


I received this error message:

Server Error in '/SitefinityPortal' Application.

This type of page is not served.

Description: The type of page you have requested is not served because it has been explicitly forbidden.     Please review the URL below and make sure that it is spelled correctly.

Requested URL: /SitefinityPortal/login/select/


Thanks,~Pik

Posted by Community Admin on 21-Mar-2011 00:00

Hello,

The page /SitefinityPortal/login/select/ does not exist - this is not the correct url or the user you use does not have view permissions.

Kind regards,
Ivan Dimitrov
the Telerik team

Posted by Community Admin on 22-Mar-2011 00:00

Thanks for the reply.

The page does exists. It is working fine if I used the sitefinity login control but not my custom login control. Any idea why?

Thanks,
Pik

Posted by Community Admin on 22-Mar-2011 00:00

Hi Pik,

Since this page does not exist the problem is in your code and the way that you construct the url. I do not know what the the proper url for your specific SiteMap structure.

Regards,
Ivan Dimitrov
the Telerik team

This thread is closed