Enables scripted content fragments to perform authorization tasks and retrieve OAuth data.
- ChangePassword
- ChangePasswordUsingToken
- CreateLoginAndRedirect
- GetExternalLinkedAuthenticationProvider
- GetExternalLinkedAuthenticationUserData
- GetLastLoginType
- GetOAuthData
- GetOAuthProvider
- Impersonator
- IsAuthorizationRequest
- IsImpersonated
- LinkLoginAndRedirect
- ListExternalLinkedAuthenticationProviders
- ListOAuthProviders
- LoginAndRedirect
- Logout
- RedirectToAuthenticationLink
- RedirectToLogin
- RequireOriginalPasswordWhenChangingPassword
- ResetPassword
- SendChangePasswordEmail
Methods
ChangePassword
Changes the password of the accessing user
Velocity
#set($additionalInfoResponse = $core_v2_authentication.ChangePassword($oldPassword, $newPassword))
JavaScript
var additionalInfoResponse = core_v2_authentication.ChangePassword(oldPassword, newPassword);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
oldPassword | String | Current Password | Required | ||
newPassword | String | New Password | Required |
Returns
ChangePasswordUsingToken
Changes the password of the token-verified user
Velocity
#set($additionalInfoResponse = $core_v2_authentication.ChangePasswordUsingToken($token, $newPassword))
JavaScript
var additionalInfoResponse = core_v2_authentication.ChangePasswordUsingToken(token, newPassword);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
token | String | Context token for verifying user identity | Required | ||
newPassword | String | New Password | Required |
Returns
CreateLoginAndRedirect
CreateLoginAndRedirect Overload 1
Creates a new user from explicit credentials, logs the user in, and redirects to a redirectUrl
Velocity
#set($booleanResponse = $core_v2_authentication.CreateLoginAndRedirect($username, $password, $privateEmail, $rememberUser, $redirectUrl, "%{ AcceptTermsOfService = $acceptTermsOfServiceArg, 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 }"))
JavaScript
var booleanResponse = core_v2_authentication.CreateLoginAndRedirect(username, password, privateEmail, rememberUser, redirectUrl, { AcceptTermsOfService: acceptTermsOfServiceArg, 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 | Boolean | Remember User | Required | ||
redirectUrl | String | Redirect Url | Required | ||
options | Options | Set of optional parameters including: | Required | ||
AcceptTermsOfService | Boolean | Registers that a user has accepted the terms of service for this community when applicable. The default is false. | Optional | ||
AllowSitePartnersToContact | Boolean | Allow Site Partners To Contact | Optional | ||
AllowSiteToContact | Boolean | Allow Site To Contact | Optional | ||
Bio | String | Bio | Optional | ||
Birthday | DateTime | Birthday | Optional | ||
DisplayName | String | Display Name | Optional | ||
EnableEmail | Boolean | Allow user to receive emails. | Optional | ||
EnableHtmlEmail | Boolean | 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 of String | Rss Feeds | Optional | ||
TimeZone | Double | Time Zone | Optional | ||
WebUrl | String | Web Url | Optional |
CreateLoginAndRedirect Overload 2
Creates a new user from an external authentication data token, logs the user in, and redirects to a redirectUrl
Velocity
#set($booleanResponse = $core_v2_authentication.CreateLoginAndRedirect($externalUserDataToken, $rememberUser, $redirectUrl, "%{ AcceptTermsOfService = $acceptTermsOfServiceArg, 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 }"))
JavaScript
var booleanResponse = core_v2_authentication.CreateLoginAndRedirect(externalUserDataToken, rememberUser, redirectUrl, { AcceptTermsOfService: acceptTermsOfServiceArg, 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 |
---|---|---|---|---|---|
externalUserDataToken | String | External User Data Token | Required | ||
rememberUser | Boolean | Remember User | Required | ||
redirectUrl | String | Redirect Url | Required | ||
options | Options | Set of optional parameters including: | Required | ||
AcceptTermsOfService | Boolean | Registers that a user has accepted the terms of service for this community when applicable. The default is false. | Optional | ||
AllowSitePartnersToContact | Boolean | Allow Site Partners To Contact | Optional | ||
AllowSiteToContact | Boolean | 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 of String | Rss Feeds | Optional | ||
TimeZone | Double | Time Zone | Optional | ||
WebUrl | String | Web Url | Optional |
Returns
Boolean
GetExternalLinkedAuthenticationProvider
Velocity
#set($externalLinkedAuthenticationProviderResponse = $core_v2_authentication.GetExternalLinkedAuthenticationProvider($id))
JavaScript
var externalLinkedAuthenticationProviderResponse = core_v2_authentication.GetExternalLinkedAuthenticationProvider(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | String | Id | Required |
Returns
GetExternalLinkedAuthenticationUserData
Velocity
#set($externalLinkedAuthenticationUserDataResponse = $core_v2_authentication.GetExternalLinkedAuthenticationUserData($externalUserDataToken))
JavaScript
var externalLinkedAuthenticationUserDataResponse = core_v2_authentication.GetExternalLinkedAuthenticationUserData(externalUserDataToken);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
externalUserDataToken | String | External User Data Token | Required |
Returns
GetLastLoginType
Returns the last login type for the accessing user
Velocity
#set($stringResponse = $core_v2_authentication.GetLastLoginType())
JavaScript
var stringResponse = core_v2_authentication.GetLastLoginType();
Returns
String
GetOAuthData
Velocity
#set($oAuthDataResponse = $core_v2_authentication.GetOAuthData($oAuthDataToken))
JavaScript
var oAuthDataResponse = core_v2_authentication.GetOAuthData(oAuthDataToken);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
oAuthDataToken | String | O Auth Data Token | Required |
Returns
GetOAuthProvider
Velocity
#set($oAuthProviderResponse = $core_v2_authentication.GetOAuthProvider($clientType))
JavaScript
var oAuthProviderResponse = core_v2_authentication.GetOAuthProvider(clientType);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
clientType | String | Client Type | Required |
Returns
Impersonator
Returns the user performing impersonation of the accessing user
Velocity
#set($userResponse = $core_v2_authentication.Impersonator())
JavaScript
var userResponse = core_v2_authentication.Impersonator();
Returns
IsAuthorizationRequest
Returns whether the current request is an authorization request by an OAuth client
Velocity
#set($booleanResponse = $core_v2_authentication.IsAuthorizationRequest())
JavaScript
var booleanResponse = core_v2_authentication.IsAuthorizationRequest();
Returns
Boolean
IsImpersonated
Returns whether the accessing user is impersonated
Velocity
#set($booleanResponse = $core_v2_authentication.IsImpersonated())
JavaScript
var booleanResponse = core_v2_authentication.IsImpersonated();
Returns
Boolean
LinkLoginAndRedirect
Authenticates an existing user, links the user to an external account, and redirects to a redirectUrl
Velocity
#set($booleanResponse = $core_v2_authentication.LinkLoginAndRedirect($externalUserDataToken, $userName, $password, $rememberUser, $redirectUrl))
JavaScript
var booleanResponse = core_v2_authentication.LinkLoginAndRedirect(externalUserDataToken, userName, password, rememberUser, redirectUrl);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
externalUserDataToken | String | External User Data Token | Required | ||
userName | String | User Name | Required | ||
password | String | Password | Required | ||
rememberUser | Boolean | Remember User | Required | ||
redirectUrl | String | Redirect Url | Required |
Returns
Boolean
ListExternalLinkedAuthenticationProviders
Velocity
#set($iListResponse = $core_v2_authentication.ListExternalLinkedAuthenticationProviders())
JavaScript
var iListResponse = core_v2_authentication.ListExternalLinkedAuthenticationProviders();
Returns
IList of ExternalLinkedAuthenticationProvider
ListOAuthProviders
Velocity
#set($iListResponse = $core_v2_authentication.ListOAuthProviders())
JavaScript
var iListResponse = core_v2_authentication.ListOAuthProviders();
Returns
IList of OAuthProvider
LoginAndRedirect
LoginAndRedirect Overload 1
Logs a user in via credentials and redirects to a redirect URL
Velocity
#set($booleanResponse = $core_v2_authentication.LoginAndRedirect($userName, $password, $rememberUser, $redirectUrl))
JavaScript
var 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 | Boolean | Remember User | Required | ||
redirectUrl | String | Redirect Url | Required |
LoginAndRedirect Overload 2
Logs a user in via an external authentication provider token and redirects a redirect URL
Velocity
#set($booleanResponse = $core_v2_authentication.LoginAndRedirect($externalUserDataToken, $rememberUser, $redirectUrl))
JavaScript
var booleanResponse = core_v2_authentication.LoginAndRedirect(externalUserDataToken, rememberUser, redirectUrl);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
externalUserDataToken | String | External User Data Token | Required | ||
rememberUser | Boolean | Remember User | Required | ||
redirectUrl | String | Redirect Url | Required |
Returns
Boolean
Logout
Unauthenticates the accessing user
Velocity
#set($stringResponse = $core_v2_authentication.Logout())
JavaScript
var stringResponse = core_v2_authentication.Logout();
Returns
String
RedirectToAuthenticationLink
Redirects the accessing user to an external authentication provider's authentication form
Velocity
#set($booleanResponse = $core_v2_authentication.RedirectToAuthenticationLink($providerId, $callbackUrl, $userDataTokenName))
JavaScript
var booleanResponse = core_v2_authentication.RedirectToAuthenticationLink(providerId, callbackUrl, userDataTokenName);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
providerId | String | External authentication type/id | Required | ||
callbackUrl | String | URL to return to after the authentication process completes | Required | ||
userDataTokenName | String | User data token key name. Data about the user and their external authentication provider will be available via this parameter after the authentication process completes | Required |
Returns
Boolean
RedirectToLogin
Redirects to the Login Form
Velocity
$core_v2_authentication.RedirectToLogin()
JavaScript
core_v2_authentication.RedirectToLogin();
Returns
NothingRequireOriginalPasswordWhenChangingPassword
Returns whether an original password is required to change a password based on the presence of a password reset token
Velocity
#set($booleanResponse = $core_v2_authentication.RequireOriginalPasswordWhenChangingPassword())
JavaScript
var booleanResponse = core_v2_authentication.RequireOriginalPasswordWhenChangingPassword();
Returns
Boolean
ResetPassword
ResetPassword Overload 1
Resets the password for a user
Velocity
#set($additionalInfoResponse = $core_v2_authentication.ResetPassword($userId))
JavaScript
var additionalInfoResponse = core_v2_authentication.ResetPassword(userId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
userId | Int32 | User Id | Required |
ResetPassword Overload 2
Resets the password for a user by email address
Velocity
#set($additionalInfoResponse = $core_v2_authentication.ResetPassword($email))
JavaScript
var additionalInfoResponse = core_v2_authentication.ResetPassword(email);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
String | Required |
Returns
SendChangePasswordEmail
SendChangePasswordEmail Overload 1
Sends a password change email
Velocity
#set($additionalInfoResponse = $core_v2_authentication.SendChangePasswordEmail($userId))
JavaScript
var additionalInfoResponse = core_v2_authentication.SendChangePasswordEmail(userId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
userId | Int32 | User Id | Required |
SendChangePasswordEmail Overload 2
Sends a password change email for a given email address
Velocity
#set($additionalInfoResponse = $core_v2_authentication.SendChangePasswordEmail($email))
JavaScript
var additionalInfoResponse = core_v2_authentication.SendChangePasswordEmail(email);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
String | Required |