com.smartystreets.api.StaticCredentials 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;
/**
* StaticCredentials takes a SmartyStreets Secret Key Pair, and 'signs' the request with it so the
* SmartyStreets API knows which SmartyStreets account and subscription is sending it.
* Look on the API Keys tab of your SmartyStreets account page to find/generate your keys.
*/
public class StaticCredentials implements Credentials {
private String authId;
private String authToken;
public StaticCredentials(String authId, String authToken) {
this.authId = authId;
this.authToken = authToken;
}
public void sign(Request request) {
request.putParameter("auth-id", this.authId);
request.putParameter("auth-token", this.authToken);
}
}