• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class AuthenticationController

The AuthenticationController class provides the Business Layer for the Authentication Systems.

Inheritance
System.Object
AuthenticationController
Namespace: DotNetNuke.Services.Authentication
Assembly: DotNetNuke.dll
Syntax
public class AuthenticationController : object

Methods

| Improve this Doc View Source

AddAuthentication(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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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
| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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

true if the portal has any Non-DNN authentication enabled, Otherwise false.

| Improve this Doc View Source

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

true if OAuth Provider and it is enabled for the portal, Otherwise false.

| Improve this Doc View Source

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
| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS