Enables scripted content fragments to use OAuth clients
Properties
Name | Type | Description | Default | Options |
---|---|---|---|---|
Current | 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
Usage
#set($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 |
Return Type
string
Deny
Returns a URL to redirect back to the client when denying a request to use your account for the provided scope.
Usage
#set($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 |
Return Type
string
Get
Gets a OAuth Client
Usage
#set($oAuthClientResponse = $core_v2_oauthClient.Get($clientId))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
clientId | Guid | Client Id | Required |
Return Type
Validate
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.
Usage
#set($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 |
Return Type
string
Validate
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.
Usage
#set($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 |
Return Type
string