Filter:   InfoImg
download BinaryToken.java
Language: Java
Copyright: (c) 2005 by Sun Microsystems/Ray Lai under Common Development and Distribution License
LOC: 16
Project Info
identity management security patterns(identitypatterns)
Server: java.net
Type: cvs
...terns\src\com\csp\identity\
   Assertion.java
   AssertionBuilder.java
   AssertionContext.java
   AssertionContextImpl.java
   Attribute.java
   AttributeStatement.java
   ...nticationStatement.java
   ...nDecisionStatement.java
   BinaryToken.java
   CredentialTokenizer.java
   SecurityToken.java
   SSOContext.java
   SSOContextImpl.java
   SSODelegator.java
   SSODelegatorException.java
   SSODelegatorFactory.java
   ...legatorFactoryImpl.java
   ...er_SampleFunction1.java
   SSOServiceProvider.java
   ...rviceProviderImpl1.java
   ...rviceProviderImpl2.java
   Subject.java
   TokenContext.java
   TokenContextImpl.java
   UsernameToken.java
   X509CertToken.java

/*
 * 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;
    }
}