All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.trimble.id.FixedTokenProvider Maven / Gradle / Ivy

Go to download

Trimble Identity OAuth Client library holds the client classes that are used for communicating with Trimble Identity Service

The newest version!
package com.trimble.id;

import java.util.concurrent.CompletableFuture;

/**
 * Represents a token provider that returns a fixed token.
 */
public class FixedTokenProvider implements ITokenProvider {

    private String accessToken;

    /**
     * Creates a new instance of the FixedTokenProvider class.
     * @param accessToken - The access token to return.
     */
    public FixedTokenProvider(String accessToken) {
        this.accessToken = accessToken;
    }

    /**
     * Gets the access token.
     * @return A CompletableFuture that contains the access token.
     */
    @Override
    public CompletableFuture getAccessToken() throws SDKClientException {
        return CompletableFuture.completedFuture(this.accessToken);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy