All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.entur.gbfs.authentication.HttpHeadersRequestAuthenticator Maven / Gradle / Ivy

There is a newer version: 4.0.19
Show newest version
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