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

com.paypal.base.credential.TokenAuthorization Maven / Gradle / Ivy

There is a newer version: 1.14.0
Show 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;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy