Class LogOnHandler
- Namespace
- Dynamicweb.Frontend
- Assembly
- Dynamicweb.dll
The extranet authentication handler.
public sealed class LogOnHandler
- Inheritance
-
LogOnHandler
- Inherited Members
Constructors
LogOnHandler()
public LogOnHandler()
LogOnHandler(int)
Initializes new instance of the class.
public LogOnHandler(int pageId)
Parameters
Properties
IsUserLoggedIn
Determines whether user is logged in.
public static bool IsUserLoggedIn { get; }
Property Value
Methods
ExternalLogOn(ExternalLoginResult)
Grants access to extranet with external account.
public void ExternalLogOn(ExternalLoginResult logOnResult)
Parameters
logOnResult
ExternalLoginResult- The ExternalLoginResult.
ExternalLogOn(ExternalLoginResult, bool)
Grants access to extranet with external account.
public void ExternalLogOn(ExternalLoginResult logOnResult, bool isADLogin)
Parameters
logOnResult
ExternalLoginResult- The ExternalLoginResult.
isADLogin
bool- Determines whether the external account is Active Directory account.
ExternalLogOn(ExternalLoginResult, bool, int)
Grants access to extranet with external account.
public void ExternalLogOn(ExternalLoginResult logOnResult, bool isADLogin, int pageId)
Parameters
logOnResult
ExternalLoginResult- The ExternalLoginResult.
isADLogin
bool- Determines whether the external account is Active Directory account.
pageId
int- The page where the login is performed.
GetLoginToken(string, string)
Gets a login token for a user and password.
public static string GetLoginToken(string username, string password)
Parameters
Returns
- string
- A token that can be used in logons using a querystring: ?Username={username}&pwtoken={token} or by calling ExtranetLoginToken(string, string).
GetPasswordToken(string)
Gets a password token for a password that can be used for later validation.
public static string GetPasswordToken(string password)
Parameters
password
string- The password. Can be the encrypted version
Returns
- string
- A token that can be used in logons using a querystring: ?Username={username}&pwtoken={token} or by calling ExtranetLoginToken(string, string).
LogOff()
Logs off the user.
public static void LogOff()
LogOff(bool)
Logs off the user.
public static void LogOff(bool redirect)
Parameters
redirect
bool- Determines whether user should be redirected after log off.
LogOn(string, string)
Logs on a user to the frontend extranet module.
public void LogOn(string username, string password)
Parameters
LogOn(string, string, bool)
Logs on a user to the frontend extranet module.
public void LogOn(string username, string password, bool onlyActive)
Parameters
username
string- The username.
password
string- The password.
onlyActive
bool- If set to
True
, only active users can log on the extranet.
LogOn(string, string, int)
Logs on a user to the frontend extranet module.
public void LogOn(string username, string password, int LoginProvider)
Parameters
LogOnWithToken(string, string)
Logs on a user to the frontend extranet module using a username and a password or login token.
public void LogOnWithToken(string username, string token)
Parameters
Remarks
Use the GetPasswordToken(string) or GetLoginToken(string, string) to create a token that can be used
SaveCookie()
Saves the cookie.
public void SaveCookie()