org.entur.gbfs.authentication.HttpHeadersRequestAuthenticator 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.HashMap;
import java.util.Map;
public class HttpHeadersRequestAuthenticator implements RequestAuthenticator {
private final Map headersToSet;
public HttpHeadersRequestAuthenticator(Map headers) {
this.headersToSet = new HashMap(headers);
}
@Override
public void authenticateRequest(Map httpHeaders)
throws RequestAuthenticationException {
for (String key : headersToSet.keySet()) {
httpHeaders.put(key, headersToSet.get(key));
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy