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

com.exasol.bucketfs.jsonrpc.BearerTokenAuthenticator Maven / Gradle / Ivy

The newest version!
package com.exasol.bucketfs.jsonrpc;

import java.net.http.HttpRequest;

/**
 * Authenticate an HTTP request via a bearer token.
 */
class BearerTokenAuthenticator implements Authenticator {
    private final String token;

    BearerTokenAuthenticator(final String token) {
        this.token = token;
    }

    @Override
    public void authenticate(final HttpRequest.Builder requestBuilder) {
        requestBuilder.header("Authorization", "Bearer " + this.token);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy