
io.sphere.internal.request.SetCredentials Maven / Gradle / Ivy
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 - 2025 Weber Informatics LLC | Privacy Policy