Enables scripted content fragments to perform authorization tasks and retrieve OAuth data.
Methods
ChangePassword
Changes the password of the accessing user
Usage
#set($additionalInfoResponse = $core_v2_authentication.ChangePassword($oldPassword, $newPassword))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
oldPassword | string | Current Password | Required | ||
newPassword | string | New Password | Required |
Return Type
CreateLoginAndRedirect
Creates a new user from explicit credentials, logs the user in, and redirects to a redirectUrl
Usage
#set($booleanResponse = $core_v2_authentication.CreateLoginAndRedirect($username, $password, $privateEmail, $rememberUser, $redirectUrl, "%{AllowSitePartnersToContact = $allowSitePartnersToContactArg, AllowSiteToContact = $allowSiteToContactArg, Bio = $bioArg, Birthday = $birthdayArg, DisplayName = $displayNameArg, EnableEmail = $enableEmailArg, EnableHtmlEmail = $enableHtmlEmailArg, Gender = $genderArg, Language = $languageArg, Location = $locationArg, PublicEmail = $publicEmailArg, RssFeeds = $rssFeedsArg, TimeZone = $timeZoneArg, WebUrl = $webUrlArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
username | string | Username | Required | ||
password | string | Password | Required | ||
privateEmail | string | Private Email | Required | ||
rememberUser | bool | Remember User | Required | ||
redirectUrl | string | Redirect Url | Required | ||
AllowSitePartnersToContact | bool | Allow Site Partners To Contact | Optional | ||
AllowSiteToContact | bool | Allow Site To Contact | Optional | ||
Bio | string | Bio | Optional | ||
Birthday | DateTime | Birthday | Optional | ||
DisplayName | string | Display Name | Optional | ||
EnableEmail | bool | Allow user to receive emails. | Optional | ||
EnableHtmlEmail | bool | Allow user to receive emails in the HTML format. | Optional | ||
Gender | string | Gender | Optional | ||
Language | string | Language | Optional | ||
Location | string | Location | Optional | ||
PublicEmail | string | Public Email | Optional | ||
RssFeeds | IList<string> | Rss Feeds | Optional | ||
TimeZone | double | Time Zone | Optional | ||
WebUrl | string | Web Url | Optional |
Return Type
bool
CreateLoginAndRedirect
Creates a new user from an OAuth data token, logs the user in, and redirects to a redirectUrl
Usage
#set($booleanResponse = $core_v2_authentication.CreateLoginAndRedirect($oAuthDataToken, $rememberUser, $redirectUrl, "%{AllowSitePartnersToContact = $allowSitePartnersToContactArg, AllowSiteToContact = $allowSiteToContactArg, Bio = $bioArg, Birthday = $birthdayArg, DisplayName = $displayNameArg, Email = $emailArg, Gender = $genderArg, Language = $languageArg, Location = $locationArg, PublicEmail = $publicEmailArg, RssFeeds = $rssFeedsArg, TimeZone = $timeZoneArg, WebUrl = $webUrlArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
oAuthDataToken | string | O Auth Data Token | Required | ||
rememberUser | bool | Remember User | Required | ||
redirectUrl | string | Redirect Url | Required | ||
AllowSitePartnersToContact | bool | Allow Site Partners To Contact | Optional | ||
AllowSiteToContact | bool | Allow Site To Contact | Optional | ||
Bio | string | Bio | Optional | ||
Birthday | DateTime | Birthday | Optional | ||
DisplayName | string | Display Name | Optional | ||
string | Optional | ||||
Gender | string | Gender | Optional | ||
Language | string | Language | Optional | ||
Location | string | Location | Optional | ||
PublicEmail | string | Public Email | Optional | ||
RssFeeds | IList<string> | Rss Feeds | Optional | ||
TimeZone | double | Time Zone | Optional | ||
WebUrl | string | Web Url | Optional |
Return Type
bool
GetLastLoginType
Returns the last login type for the accessing user
Usage
#set($stringResponse = $core_v2_authentication.GetLastLoginType())
Return Type
string
GetOAuthData
Gets the available OAuthData delivered from an OAuth provider
Usage
#set($oAuthDataResponse = $core_v2_authentication.GetOAuthData($oAuthDataToken))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
oAuthDataToken | string | O Auth Data Token | Required |
Return Type
GetOAuthProvider
Gets an OAuth provider
Usage
#set($oAuthProviderResponse = $core_v2_authentication.GetOAuthProvider($clientType))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
clientType | string | Client Type | Required |
Return Type
Impersonator
Returns the user performing impersonation of the accessing user
Usage
#set($userResponse = $core_v2_authentication.Impersonator())
Return Type
IsAuthorizationRequest
Returns whether the current request is an authorization request by an OAuth client
Usage
#set($booleanResponse = $core_v2_authentication.IsAuthorizationRequest())
Return Type
bool
IsImpersonated
Returns whether the accessing user is impersonated
Usage
#set($booleanResponse = $core_v2_authentication.IsImpersonated())
Return Type
bool
LinkLoginAndRedirect
Authenticates an existing user, links thie user to an OAuth account, and redirects to a redirectUrl
Usage
#set($booleanResponse = $core_v2_authentication.LinkLoginAndRedirect($oAuthDataToken, $userName, $password, $rememberUser, $redirectUrl))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
oAuthDataToken | string | O Auth Data Token | Required | ||
userName | string | User Name | Required | ||
password | string | Password | Required | ||
rememberUser | bool | Remember User | Required | ||
redirectUrl | string | Redirect Url | Required |
Return Type
bool
ListOAuthProviders
Lists OAuth providers
Usage
#set($iListResponse = $core_v2_authentication.ListOAuthProviders())
Return Type
IList<OAuthProvider>
LoginAndRedirect
Logs a user in via OAuth and redirects a redirect URL
Usage
#set($booleanResponse = $core_v2_authentication.LoginAndRedirect($oAuthDataToken, $rememberUser, $redirectUrl))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
oAuthDataToken | string | O Auth Data Token | Required | ||
rememberUser | bool | Remember User | Required | ||
redirectUrl | string | Redirect Url | Required |
Return Type
bool
LoginAndRedirect
Logs a user in via credentials and redirects to a redirect URL
Usage
#set($booleanResponse = $core_v2_authentication.LoginAndRedirect($userName, $password, $rememberUser, $redirectUrl))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
userName | string | User Name | Required | ||
password | string | Password | Required | ||
rememberUser | bool | Remember User | Required | ||
redirectUrl | string | Redirect Url | Required |
Return Type
bool
Logout
Unauthenticates the accessing user
Usage
#set($stringResponse = $core_v2_authentication.Logout())
Return Type
string
RedirectToAuthenticationLink
Redirects the accessing user to an OAuth provider's authentication form
Usage
#set($booleanResponse = $core_v2_authentication.RedirectToAuthenticationLink($clientType, $callbackUrl, $oAuthDataTokenKeyName))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
clientType | string | OAuth client type | Required | ||
callbackUrl | string | URL to return to after the OAuth process completes | Required | ||
oAuthDataTokenKeyName | string | OAuth Data Token key name. The OAuth token will be available via this parameter after the OAuth process completes | Required |
Return Type
bool
RedirectToLogin
Redirects to the Login Form
Usage
$core_v2_authentication.RedirectToLogin()
RequireOriginalPasswordWhenChangingPassword
Returns whether an original password is required to change a password based on the presence of a password reset token
Usage
#set($booleanResponse = $core_v2_authentication.RequireOriginalPasswordWhenChangingPassword())
Return Type
bool
ResetPassword
Resets the password for a user
Usage
#set($additionalInfoResponse = $core_v2_authentication.ResetPassword($userId))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
userId | int | User Id | Required |
Return Type
SendChangePasswordEmail
Sends a password change email
Usage
#set($additionalInfoResponse = $core_v2_authentication.SendChangePasswordEmail($userId))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
userId | int | User Id | Required |