Skip to content

Overview

//trimble-id/com.trimble.id/AuthorizationCodeGrantTokenProvider

AuthorizationCodeGrantTokenProvider

[JVM]
open class AuthorizationCodeGrantTokenProvider : ITokenProvider

A token provider based on the OAuth Authorization Code grant type

Constructors

AuthorizationCodeGrantTokenProvider[JVM]
constructor(endpointProvider: IEndpointProvider, clientId: String, redirectUri: URI)
Public constructor of AuthorizationCodeGrantTokenProvider class

Properties

NameSummary
endpointProvider[JVM]
open val endpointProvider: IEndpointProvider
httpTokenClient[JVM]
open val httpTokenClient: IHttpTokenClient
refreshableTokenProvider[JVM]
open var refreshableTokenProvider: RefreshableTokenProvider

Functions

NameSummary
createAuthorizationUri[JVM]
open fun createAuthorizationUri(): CompletableFuture<URI>
Create an authorization URI with the provided parameters
createLogoutUri[JVM]
open fun createLogoutUri(): CompletableFuture<URI>
Create a logout URI with the provided parameters
getAccessToken[JVM]
open fun getAccessToken(): CompletableFuture<String>
Retrieves an access token for the authenticated user
getIdToken[JVM]
open fun getIdToken(): CompletableFuture<String>
Retrieves an ID token for the authenticated user
getRefreshToken[JVM]
open fun getRefreshToken(): CompletableFuture<String>
Retrieves a refresh token for the authenticated user
isAuthorizationSuccessful[JVM]
open fun isAuthorizationSuccessful(queryString: String): CompletableFuture<Boolean>
Checks if the authorization was successful
revokeRefreshToken[JVM]
open fun revokeRefreshToken(): CompletableFuture<Integer>
Revokes the refresh token
withClientSecret[JVM]
open fun withClientSecret(clientSecret: String): AuthorizationCodeGrantTokenProvider
Fluent extension to add client secret to the token provider
withCodeChallenge[JVM]
open fun withCodeChallenge(codeChallenge: String): AuthorizationCodeGrantTokenProvider
Fluent extension to add code challenge to the token provider
withCodeVerifier[JVM]
open fun withCodeVerifier(codeVerifier: String): AuthorizationCodeGrantTokenProvider
Fluent extension to add code verifier to the token provider
withIdentityProvider[JVM]
open fun withIdentityProvider(identityProvider: String): AuthorizationCodeGrantTokenProvider
Fluent extension to add identity provider to the token provider
withLogoutRedirect[JVM]
open fun withLogoutRedirect(logoutRedirectUri: URI): AuthorizationCodeGrantTokenProvider
Fluent extension to add logout redirect URI to the token provider
withProofKeyForCodeExchange[JVM]
open fun withProofKeyForCodeExchange(): AuthorizationCodeGrantTokenProvider
Fluent extension to use PKCE flow for the token provider
withRandomState[JVM]
open fun withRandomState(): AuthorizationCodeGrantTokenProvider
Fluent extension to add random state to the token provider
withScopes[JVM]
open fun withScopes(scopes: Array<String>): AuthorizationCodeGrantTokenProvider
Fluent extension to add scopes to the token provider
withState[JVM]
open fun withState(state: String): AuthorizationCodeGrantTokenProvider
Fluent extension to add state to the token provider