org.genesys.glis.v1.invoker.auth.OAuth Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glis-client-resttemplate Show documentation
Show all versions of glis-client-resttemplate Show documentation
API client for the Global Information System for plant genetic resources for food and agriculture (PGRFA) with Spring REST template
package org.genesys.glis.v1.invoker.auth;
import org.springframework.http.HttpHeaders;
import org.springframework.util.MultiValueMap;
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-09-11T09:49:15.074Z")
public class OAuth implements Authentication {
private String accessToken;
public String getAccessToken() {
return accessToken;
}
public void setAccessToken(String accessToken) {
this.accessToken = accessToken;
}
@Override
public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) {
if (accessToken != null) {
headerParams.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken);
}
}
}