org.entur.gbfs.authentication.BearerTokenRequestAuthenticator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gbfs-loader-java Show documentation
Show all versions of gbfs-loader-java Show documentation
Manage loading of GBFS feeds
package org.entur.gbfs.authentication;
import java.util.Map;
public class BearerTokenRequestAuthenticator implements RequestAuthenticator {
private final String accessToken;
public BearerTokenRequestAuthenticator(String accessToken) {
this.accessToken = accessToken;
}
@Override
public void authenticateRequest(Map httpHeaders)
throws RequestAuthenticationException {
httpHeaders.put("Authorization", String.format("Bearer %s", accessToken));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy