Codeunit OAuth
Contains methods supporting authentication via OAuth 1.0 protocol.
Properties
| Name | Value |
|---|---|
| Access | Public |
| InherentEntitlements | X |
| InherentPermissions | X |
Methods
GetOAuthAccessToken
Gets an OAuth request token from an OAuth provider.
[TryFunction]
procedure GetOAuthAccessToken(ConsumerKey: SecretText, ConsumerSecret: SecretText, RequestTokenUrl: Text, CallbackUrl: Text, var AccessTokenKey: SecretText, var AccessTokenSecret: SecretText): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| ConsumerKey | SecretText |
The OAuth consumer key. Cannot be null. |
| ConsumerSecret | SecretText |
The OAuth consumer secret. Cannot be null. |
| RequestTokenUrl | Text |
The URL of the OAuth provider. Cannot be null. |
| CallbackUrl | Text |
Local URL for OAuth callback. Cannot be null. |
| AccessTokenKey | SecretText |
The OAuth response token key. |
| AccessTokenSecret | SecretText |
The OAuth response token secret. |
Returns
| Type | Description |
|---|---|
| Boolean |
GetOAuthAccessToken
Gets an OAuth access token from an OAuth provider.
[TryFunction]
procedure GetOAuthAccessToken(ConsumerKey: SecretText, ConsumerSecret: SecretText, RequestTokenUrl: Text, Verifier: Text, RequestTokenKey: Text, RequestTokenSecret: Text, var AccessTokenKey: SecretText, var AccessTokenSecret: SecretText): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| ConsumerKey | SecretText |
The OAuth consumer key. Cannot be null. |
| ConsumerSecret | SecretText |
The OAuth consumer secret. Cannot be null. |
| RequestTokenUrl | Text |
The URL of the OAuth provider. Cannot be null. |
| Verifier | Text |
An OAuth verifier string. Cannot be null. |
| RequestTokenKey | Text |
The OAuth request token key. Cannot be null. |
| RequestTokenSecret | Text |
The OAuth request token secret. Cannot be null. |
| AccessTokenKey | SecretText |
Exit parameter containing the OAuth response token key. |
| AccessTokenSecret | SecretText |
Exit parameter containing the OAuth response token secret. |
Returns
| Type | Description |
|---|---|
| Boolean |
GetAuthorizationHeader
Gets the authorization header for an OAuth specific REST call.
[TryFunction]
procedure GetAuthorizationHeader(ConsumerKey: SecretText, ConsumerSecret: SecretText, RequestTokenKey: SecretText, RequestTokenSecret: SecretText, RequestUrl: Text, RequestMethod: Enum "Http Request Type", var AuthorizationHeader: SecretText): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| ConsumerKey | SecretText |
The OAuth consumer key. Cannot be null. |
| ConsumerSecret | SecretText |
The OAuth consumer secret. Cannot be null. |
| RequestTokenKey | SecretText |
The OAuth response token key. Cannot be null. |
| RequestTokenSecret | SecretText |
The OAuth response token secret. Cannot be null. |
| RequestUrl | Text |
The REST URL. Cannot be null. |
| RequestMethod | Enum System.Security.Authentication."Http Request Type" |
The REST method call with capital letters(POST, GET, PUT, PATCH, DELETE). |
| AuthorizationHeader | SecretText |
Exit parameter containing the requested OAuth specific authorization header. |
Returns
| Type | Description |
|---|---|
| Boolean |