com.paypal.base.credential.TokenAuthorization Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rest-api-sdk Show documentation
Show all versions of rest-api-sdk Show documentation
PayPal SDK for integrating with the REST APIs
The newest version!
package com.paypal.base.credential;
/**
* TokenAuthorization encapsulates third party token authorization. Used for
* MERCHANT or PLATFORM APIs
*/
public class TokenAuthorization {
/**
* Access token
*/
private String accessToken;
/**
* Token secret
*/
private String tokenSecret;
/**
* Token based third party authorization used in MERCHANT or PLATFORM APIs
*
* @param accessToken
* Access Token
* @param tokenSecret
* Token Secret
*/
public TokenAuthorization(String accessToken, String tokenSecret) {
super();
if (accessToken == null || accessToken.trim().length() == 0
|| tokenSecret == null || tokenSecret.trim().length() == 0) {
throw new IllegalArgumentException(
"TokenAuthorization arguments cannot be empty or null");
}
this.accessToken = accessToken;
this.tokenSecret = tokenSecret;
}
/**
* @return the accessToken
*/
public String getAccessToken() {
return accessToken;
}
/**
* @return the tokenSecret
*/
public String getTokenSecret() {
return tokenSecret;
}
}