Method CreateWithInstancePrincipalForDelegation
CreateWithInstancePrincipalForDelegation(String, String)
Creates a new instance of IAMAuthorizationProvider
using an instance principal with a delegation token.
Declaration
public static IAMAuthorizationProvider CreateWithInstancePrincipalForDelegation(string delegationToken, string federationEndpoint = null)
Parameters
Type | Name | Description |
---|---|---|
String | delegationToken | The delegation token. |
String | federationEndpoint | (Optional) The federation endpoint. If not specified, the federation endpoint is auto-detected. Most applications do not need to specify this parameter. |
Returns
Type | Description |
---|---|
IAMAuthorizationProvider | A new instance of IAMAuthorizationProvider that uses the instance principal with the specified delegation token. |
Remarks
The delegation token allows the instance to assume the privileges
of the user for which the token was created.
CreateWithInstancePrincipalForDelegation(Func<CancellationToken, Task<String>>, String)
Creates a new instance of IAMAuthorizationProvider
using an instance principal with a delegation token using the
specified delegation token provider delegate.
Declaration
public static IAMAuthorizationProvider CreateWithInstancePrincipalForDelegation(Func<CancellationToken, Task<string>> delegationTokenProvider, string federationEndpoint = null)
Parameters
Type | Name | Description |
---|---|---|
Func<CancellationToken, Task<String>> | delegationTokenProvider | The delegation token provider delegate. |
String | federationEndpoint | (Optional) The federation endpoint. If not specified, the federation endpoint is auto-detected. Most applications do not need to specify this parameter. |
Returns
Type | Description |
---|---|
IAMAuthorizationProvider | A new instance of IAMAuthorizationProvider that uses the instance principal and the specified delegation token provider delegate. |
Remarks
The delegation token allows the instance to assume the privileges
of the user for which the token was created. The delegation token
provider delegate will be used to obtain the delegation token each
time the request signature is renewed.