com.docraptor.auth.OAuth Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of docraptor Show documentation
Show all versions of docraptor Show documentation
A native client library for the DocRaptor HTML to PDF/XLS service.
package com.docraptor.auth;
import com.docraptor.Pair;
import java.util.Map;
import java.util.List;
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(List queryParams, Map headerParams) {
if (accessToken != null) {
headerParams.put("Authorization", "Bearer " + accessToken);
}
}
}