mesosphere.marathon.client.auth.TokenAuthRequestInterceptor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of marathon-client Show documentation
Show all versions of marathon-client Show documentation
A Java API client for Mesosphere's Marathon.
package mesosphere.marathon.client.auth;
import feign.RequestInterceptor;
import feign.RequestTemplate;
public class TokenAuthRequestInterceptor implements RequestInterceptor {
private final String headerValue;
public TokenAuthRequestInterceptor(String token) {
this.headerValue = "token=" + token;
}
@Override
public void apply(RequestTemplate template) {
template.header("Authorization", headerValue);
}
}