com.softlayer.api.http.HttpBearerCredentials Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of softlayer-api-client Show documentation
Show all versions of softlayer-api-client Show documentation
API client for accessing the SoftLayer API
package com.softlayer.api.http;
/** HTTP Bearer authorization support for IBM IAM Tokens.
*
* @see IAM Tokens
* @see Authenticating SoftLayer API
*/
public class HttpBearerCredentials implements HttpCredentials {
protected final String token;
public HttpBearerCredentials(String token) {
this.token = token;
}
/**
* Formats the token into a HTTP Authorization header.
*
* @return String
*/
public String getHeader() {
return "Bearer " + token;
}
}