/*
* Program: BinaryToken.java
* Purpose: Binary token object class
* @author Ray Lai (ray.lai@sun.com)
* @version 1.1
* Updated: April 16, 2005
* Copyright: (c) 2005 by Sun Microsystems/Ray Lai under Common Development and Distribution License
* Remarks: Full program and documentation will be available under developer.java.net
* For simplicity, logger class is removed.
* =====================================================================================
*/
package com.csp.identity;
public class BinaryToken extends com.csp.identity.SecurityToken {
protected static String base64_binary;
protected static String binaryToken;
static final String TOKEN_TYPE = "BINARY_TOKEN";
/** Constructor - create binaryToken
*
* In future implementation, the constructor should be private, and this class
* should provide a getInstance() to fetch the instance.
*/
public BinaryToken(String principal, String binaryToken) {
this.principal = principal;
this.binaryToken = binaryToken;
}
/**
* Get token id from the binary token
*
* @return binaryToken security token in binary form
*/
public String getToken() {
return this.binaryToken;
}
/**
* Get base64 binary token from the security token
*
* @return base64_binary security token in base64 encoded form
*/
public String getBase64_binary() {
return this.base64_binary;
}
}