Codeunit HttpAuthOAuthClientCredentials
Implements
Properties
| Name | Value |
|---|---|
| Access | Public |
| InherentEntitlements | X |
| InherentPermissions | X |
Methods
Initialize
Initializes the authentication object with the given AuthorityUrl, ClientId, ClientSecret and scopes
procedure Initialize(OAuthAuthorityUrl: Text, ClientId: Text, ClientSecret: SecretText, Scopes: List of [Text])
Parameters
| Name | Type | Description |
|---|---|---|
| OAuthAuthorityUrl | Text |
The OAuthAuthorityUrl to use for authentication |
| ClientId | Text |
The ClientId to use for authentication |
| ClientSecret | SecretText |
The ClientSecret to use for authentication |
| Scopes | List of [Text] |
The Scopes to use for authentication |
Initialize
Initializes the authentication object with the given AuthorityUrl, ClientId, Certificate, Certifacte Password and Scopes
procedure Initialize(OAuthAuthorityUrl: Text, ClientId: Text, Certificate: SecretText, CertificatePassword: SecretText, Scopes: List of [Text])
Parameters
| Name | Type | Description |
|---|---|---|
| OAuthAuthorityUrl | Text |
The OAuthAuthorityUrl to use for authentication |
| ClientId | Text |
The ClientId to use for authentication |
| Certificate | SecretText |
The Base64-encoded certificate for the Application (client) configured in the Azure Portal - Certificates & Secrets. |
| CertificatePassword | SecretText |
Password for the certificate. |
| Scopes | List of [Text] |
The Scopes to use for authentication |
IsAuthenticationRequired
Checks if authentication is required for the request
procedure IsAuthenticationRequired(): Boolean
Returns
| Type | Description |
|---|---|
| Boolean |
Returns true because authentication is required |
GetAuthorizationHeaders
Gets the authorization headers for the request
procedure GetAuthorizationHeaders(): Dictionary of [Text, SecretText]
Returns
| Type | Description |
|---|---|
| Dictionary of [Text, SecretText] |
Returns a dictionary of headers that need to be added to the request |