Class OAuth2Authenticator
IAuthenticator implementation using OAuth2.
Implements
Inherited Members
Namespace: Worldline.Acquiring.Sdk.Authentication
Assembly: Worldline.Acquiring.Sdk.dll
Syntax
public class OAuth2Authenticator : IAuthenticator
Constructors
OAuth2Authenticator(CommunicatorConfiguration)
Constructs a new OAuth2 authenticator.
Declaration
public OAuth2Authenticator(CommunicatorConfiguration communicatorConfiguration)
Parameters
| Type | Name | Description |
|---|---|---|
| CommunicatorConfiguration | communicatorConfiguration | The configuration object containing the OAuth2 client id, client secret and token URI,
connect timeout, and socket timeout. None of these can be |
Methods
GetAuthorization(HttpMethod, Uri, IEnumerable<IRequestHeader>)
Returns a value that can be used for the Authorization header.
Declaration
public Task<string> GetAuthorization(HttpMethod httpMethod, Uri resourceUri, IEnumerable<IRequestHeader> requestHeaders)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpMethod | httpMethod | HTTP method. |
| Uri | resourceUri | Resource URI. |
| IEnumerable<IRequestHeader> | requestHeaders | A list of request headers. |
Returns
| Type | Description |
|---|---|
| Task<string> | The |
Remarks
The list of Request headers may not be modified and may not contain headers with the same name.