# Table of Contents
Table of Contents
- OnBehalfGrantTokenProvider
- ITokenProvider
- RetrieveToken
- IEndpointProvider
- RetrieveAuthorizationEndpoint
- RetrieveTokenEndpoint
- RetrieveUserInfoEndpoint
- RetrieveTokenRevocationEndpoint
- RetrieveJSONWebKeySetEndpoint
OnBehalfGrantTokenProvider
The On Behalf grant flow allows an application to act on behalf of a user. The On Behalf grant is only supported for access tokens. It does not work with any other type of token, including refresh tokens.
constructor
Public constructor for OnBehalfGrantTokenProvider class
Parameters
endpointProviderIEndpointProvider An endpoint provider that provides the URL for the Trimble Identity token endpoints. It can be be OpenIdEndpointProvider/FixedEndpointProviderconsumerKeystring The consumer key for the calling applicationconsumerSecretstring The consumer secret for the calling applicationaccessTokenstring The access token that this application wishes to act on behalf of when calling another API
WithScopes
Fluent extension to add scopes
Parameters
scopesIEnumerable<string> The scopes to add to the token provider
Returns this
RetrieveToken
Retrieves an access token for the application
- Throws any Thrown when a token endpoint is not provided by the endpoint provider
- Throws any Thrown when a call to the token endpoint fails
Returns PromiseLike<string> A Task that resolves to the value of the access token on completion
ITokenProvider
Interface for a token provider
RetrieveToken
Returns PromiseLike<string> A promise that resolves to the value of the token on completion
IEndpointProvider
Interface for an endpoint provider
RetrieveAuthorizationEndpoint
Returns PromiseLike<string> A promise that resolves to the value of the authorization endpoint on completion
RetrieveTokenEndpoint
Returns PromiseLike<string> A promise that resolves to the value of the token endpoint on completion
RetrieveUserInfoEndpoint
Returns PromiseLike<string> A promise that resolves to the value of the user information endpoint on completion
RetrieveTokenRevocationEndpoint
Returns PromiseLike<string> A promise that resolves to the value of the token revocation endpoint on completion
RetrieveJSONWebKeySetEndpoint
Returns PromiseLike<string> A promise that resolves to the value of the JWKS endpoint on completion