com.smartystreets.api.SharedCredentials Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of smartystreets-java-sdk Show documentation
Show all versions of smartystreets-java-sdk Show documentation
A library to help Java developers easily access the SmartyStreets APIs.
package com.smartystreets.api;
/**
* SharedCredentials is useful if you want to use a website key.
*/
public class SharedCredentials implements Credentials {
private String id;
private String hostname;
public SharedCredentials(String id, String hostname) {
this.id = id;
this.hostname = hostname;
}
public void sign(Request request) {
request.putParameter("key", this.id);
request.putHeader("Referer", this.hostname);
}
}