Skip to content

# Table of Contents

Table of Contents

ClientCredentialTokenProvider

The Client Credentials grant is used when applications request an access token to access their own resources.

constructor

Public constructor for ClientCredentialTokenProvider class

Parameters

  • endpointProvider IEndpointProvider An endpoint provider that provides the URL for the Trimble Identity token endpoint. It can be OpenIdEndpointProvider/FixedEndpointProvider
  • consumerKey string The consumer key for the calling application
  • consumerSecret string The consumer secret for the calling application

WithScopes

Fluent extension to add scopes

Parameters

  • scopes IEnumerable<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 promise 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