Method ApplyAuthorizationAsync
ApplyAuthorizationAsync(Request, HttpRequestMessage, CancellationToken)
Obtains and adds the required HTTP headers for authorization with
IAM.
Declaration
public Task ApplyAuthorizationAsync(Request request, HttpRequestMessage message, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Request | request | The Request object representing the running operation. |
HttpRequestMessage | message | HTTP request message. |
CancellationToken | cancellationToken | Cancellation token. |
Returns
Type | Description |
---|---|
Task | Task that completes when the required
authorization headers are obtained and added to the
request message collection. |
Implements
Remarks
This method is called by the driver to obtain and apply the authorization information to the request. You do not need to call this method.
The required information includes the authorization generated based on the request signature, the timestamp of the request, the compartment id if present and the delegation token if used with instance principal.
Exceptions
Type | Condition |
---|---|
AuthorizationException | If failed to generate the request signature. |