Enables scripted content fragments to use OAuth clients
Properties
Name | Access | Type | Description |
---|---|---|---|
Current | Read | OAuthClient | Current contextual OAuth client |
Methods
Authorize
Authorizes a client to use your account for the provided scope. Returns the URL to redirect back to for the client
Velocity
#set($stringResponse = $core_v2_oauthClient.Authorize($clientId, $callbackUrl, $responseType, $scope, $state))
JavaScript
var stringResponse = core_v2_oauthClient.Authorize(clientId, callbackUrl, responseType, scope, state);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
clientId | Guid | Client Id | Required | ||
callbackUrl | String | Callback Url | Required | ||
responseType | String | Response Type | Required | ||
scope | String | Scope | Required | ||
state | String | State | Required |
Returns
String
Deny
Returns a URL to redirect back to the client when denying a request to use your account for the provided scope.
Velocity
#set($stringResponse = $core_v2_oauthClient.Deny($clientId, $callbackUrl, $responseType, $scope, $state))
JavaScript
var stringResponse = core_v2_oauthClient.Deny(clientId, callbackUrl, responseType, scope, state);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
clientId | Guid | Client Id | Required | ||
callbackUrl | String | Callback Url | Required | ||
responseType | String | Response Type | Required | ||
scope | String | Scope | Required | ||
state | String | State | Required |
Returns
String
Get
Gets a OAuth Client
Velocity
#set($oAuthClientResponse = $core_v2_oauthClient.Get($clientId))
JavaScript
var oAuthClientResponse = core_v2_oauthClient.Get(clientId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
clientId | Guid | Client Id | Required |
Returns
Validate
Validate Overload 1
Validates a client code request to use your account for the provided scope. If validation suggest redirecting back to the client, a URL will be returned, otherwise nothing.
Velocity
#set($stringResponse = $core_v2_oauthClient.Validate($callbackUrl, $responseType, $scope, $state))
JavaScript
var stringResponse = core_v2_oauthClient.Validate(callbackUrl, responseType, scope, state);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
callbackUrl | String | Callback Url | Required | ||
responseType | String | Response Type | Required | ||
scope | String | Scope | Required | ||
state | String | State | Required |
Validate Overload 2
Validates a client code request to use your account for the provided scope. If validation suggest redirecting back to the client, a URL will be returned, otherwise nothing.
Velocity
#set($stringResponse = $core_v2_oauthClient.Validate($clientId, $callbackUrl, $responseType, $scope, $state))
JavaScript
var stringResponse = core_v2_oauthClient.Validate(clientId, callbackUrl, responseType, scope, state);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
clientId | Guid | Client Id | Required | ||
callbackUrl | String | Callback Url | Required | ||
responseType | String | Response Type | Required | ||
scope | String | Scope | Required | ||
state | String | State | Required |
Returns
String