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

io.sphere.internal.request.SetCredentials Maven / Gradle / Ivy

There is a newer version: 0.72.1
Show newest version
package io.sphere.internal.request;

import com.ning.http.client.AsyncHttpClient;
import io.sphere.client.oauth.ClientCredentials;

public class SetCredentials {
    /** Sets OAuth authorization header for a request. */
    public static AsyncHttpClient.BoundRequestBuilder forRequest(AsyncHttpClient.BoundRequestBuilder builder, ClientCredentials credentials) {
        return builder.setHeader("Authorization", "Bearer " + credentials.getAccessToken());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy