Class AuthenticationController
The AuthenticationController class provides the Business Layer for the Authentication Systems.
Inheritance
Namespace: DotNetNuke.Services.Authentication
Assembly: DotNetNuke.dll
Syntax
public class AuthenticationController : object
Methods
| Improve this Doc View SourceAddAuthentication(AuthenticationInfo)
AddAuthentication adds a new Authentication System to the Data Store.
Declaration
public static int AddAuthentication(AuthenticationInfo authSystem)
Parameters
Type | Name | Description |
---|---|---|
AuthenticationInfo | authSystem | The new Authentication System to add. |
Returns
Type | Description |
---|---|
System.Int32 | The authentication system ID. |
AddUserAuthentication(Int32, String, String)
AddUserAuthentication adds a new UserAuthentication to the User.
Declaration
public static int AddUserAuthentication(int userID, string authenticationType, string authenticationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | userID | The new Authentication System to add. |
System.String | authenticationType | The authentication type. |
System.String | authenticationToken | The authentication token. |
Returns
Type | Description |
---|---|
System.Int32 | The user authentication ID. |
DeleteAuthentication(AuthenticationInfo)
The AuthenticationController class provides the Business Layer for the Authentication Systems.
Declaration
public static void DeleteAuthentication(AuthenticationInfo authSystem)
Parameters
Type | Name | Description |
---|---|---|
AuthenticationInfo | authSystem |
GetAuthenticationService(Int32)
GetAuthenticationService fetches a single Authentication Systems.
Declaration
public static AuthenticationInfo GetAuthenticationService(int authenticationID)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | authenticationID | The ID of the Authentication System. |
Returns
Type | Description |
---|---|
AuthenticationInfo | An AuthenticationInfo object. |
GetAuthenticationServiceByPackageID(Int32)
GetAuthenticationServiceByPackageID fetches a single Authentication System.
Declaration
public static AuthenticationInfo GetAuthenticationServiceByPackageID(int packageID)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | packageID | The id of the Package. |
Returns
Type | Description |
---|---|
AuthenticationInfo | An AuthenticationInfo object. |
GetAuthenticationServiceByType(String)
GetAuthenticationServiceByType fetches a single Authentication Systems.
Declaration
public static AuthenticationInfo GetAuthenticationServiceByType(string authenticationType)
Parameters
Type | Name | Description |
---|---|---|
System.String | authenticationType | The type of the Authentication System. |
Returns
Type | Description |
---|---|
AuthenticationInfo | An AuthenticationInfo object. |
GetAuthenticationServices()
GetAuthenticationServices fetches a list of all the Authentication Systems installed in the system.
Declaration
public static List<AuthenticationInfo> GetAuthenticationServices()
Returns
Type | Description |
---|---|
List<AuthenticationInfo> | A List of AuthenticationInfo objects. |
GetAuthenticationType()
GetAuthenticationType fetches the authentication method used by the currently logged on user.
Declaration
public static AuthenticationInfo GetAuthenticationType()
Returns
Type | Description |
---|---|
AuthenticationInfo | An AuthenticationInfo object. |
GetEnabledAuthenticationServices()
GetEnabledAuthenticationServices fetches a list of all the Authentication Systems installed in the system that have been enabled by the Host user.
Declaration
public static List<AuthenticationInfo> GetEnabledAuthenticationServices()
Returns
Type | Description |
---|---|
List<AuthenticationInfo> | A List of AuthenticationInfo objects. |
GetLogoffRedirectURL(PortalSettings, HttpRequest)
GetLogoffRedirectURL fetches the URL to redirect to after logoff.
Declaration
public static string GetLogoffRedirectURL(PortalSettings settings, HttpRequest request)
Parameters
Type | Name | Description |
---|---|---|
PortalSettings | settings | A PortalSettings object. |
HttpRequest | request | The current Request. |
Returns
Type | Description |
---|---|
System.String | The URL. |
GetUserAuthentication(Int32)
Retrieves authentication information for an user.
Declaration
public static UserAuthenticationInfo GetUserAuthentication(int userID)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | userID | The user ID. |
Returns
Type | Description |
---|---|
UserAuthenticationInfo | A UserAuthenticationInfo instance or null. |
HasSocialAuthenticationEnabled(UserControl)
Determines whether the current portal has any Non-DNN authentication providers enabled.
Declaration
public static bool HasSocialAuthenticationEnabled(UserControl control = null)
Parameters
Type | Name | Description |
---|---|---|
UserControl | control | The control. |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsEnabledForPortal(AuthenticationInfo, Int32)
Determines whether the authentication is enabled for the specified portal.
Declaration
public static bool IsEnabledForPortal(AuthenticationInfo authentication, int portalId)
Parameters
Type | Name | Description |
---|---|---|
AuthenticationInfo | authentication | The authentication. |
System.Int32 | portalId | The portal ID. |
Returns
Type | Description |
---|---|
System.Boolean |
|
SetAuthenticationType(String, Boolean)
The AuthenticationController class provides the Business Layer for the Authentication Systems.
Declaration
public static void SetAuthenticationType(string value, bool createPersistentCookie)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | |
System.Boolean | createPersistentCookie |
SetAuthenticationType(String)
SetAuthenticationType sets the authentication method used by the currently logged on user.
Declaration
public static void SetAuthenticationType(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The Authentication type. |
UpdateAuthentication(AuthenticationInfo)
UpdateAuthentication updates an existing Authentication System in the Data Store.
Declaration
public static void UpdateAuthentication(AuthenticationInfo authSystem)
Parameters
Type | Name | Description |
---|---|---|
AuthenticationInfo | authSystem | The new Authentication System to update. |