org.n52.security.common.authentication
Class SAMLTicket

java.lang.Object
  extended byorg.n52.security.common.authentication.SAMLTicket

public class SAMLTicket
extends java.lang.Object

The SAMLTicket class basically provides a SAMLResponse <-> javax.security.auth.Subject mapping.


Field Summary
protected  org.opensaml.SAMLResponse mSAMLResponse
           
 
Constructor Summary
SAMLTicket(org.w3c.dom.Document pSAMLResponse)
           
SAMLTicket(org.opensaml.SAMLResponse pSAMLResponse)
           
SAMLTicket(java.lang.String pSAMLResponse)
           
 
Method Summary
 java.lang.String asBase64String()
           
 java.lang.String asString()
           
 javax.security.auth.Subject asSubject()
           
static java.lang.String createSAMLResponseFromPrincipals(UsernameIDPrincipal pUsernameID, java.util.Set pAttributes, java.lang.String pIssuer, java.lang.String pTarget, int pTimeout, java.lang.String pAuthentMethod, java.security.Key pPrivKey, java.security.cert.Certificate pCert, boolean pBase64)
           
 void updateSubject(javax.security.auth.Subject pSubject)
           
 void verify()
          Verifies the signature of this SAML document
 void verify(java.security.cert.Certificate pWASCert)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mSAMLResponse

protected org.opensaml.SAMLResponse mSAMLResponse
Constructor Detail

SAMLTicket

public SAMLTicket(java.lang.String pSAMLResponse)
           throws org.opensaml.SAMLException
Parameters:
pSAMLResponse - String representation of an "UTF-8" coded SAMLTicket.
Throws:
org.opensaml.SAMLException

SAMLTicket

public SAMLTicket(org.w3c.dom.Document pSAMLResponse)
           throws org.opensaml.SAMLException
Parameters:
pSAMLResponse -
Throws:
org.opensaml.SAMLException

SAMLTicket

public SAMLTicket(org.opensaml.SAMLResponse pSAMLResponse)
           throws org.opensaml.SAMLException
Parameters:
pSAMLResponse -
Throws:
org.opensaml.SAMLException
Method Detail

verify

public void verify()
            throws org.opensaml.SAMLException
Verifies the signature of this SAML document

Throws:
org.opensaml.SAMLException - if the signature could not be verified

verify

public void verify(java.security.cert.Certificate pWASCert)
            throws org.opensaml.SAMLException
Throws:
org.opensaml.SAMLException

asSubject

public javax.security.auth.Subject asSubject()
Returns:

asString

public java.lang.String asString()
Returns:

asBase64String

public java.lang.String asBase64String()
Returns:

updateSubject

public void updateSubject(javax.security.auth.Subject pSubject)
Parameters:
pSubject -

createSAMLResponseFromPrincipals

public static java.lang.String createSAMLResponseFromPrincipals(UsernameIDPrincipal pUsernameID,
                                                                java.util.Set pAttributes,
                                                                java.lang.String pIssuer,
                                                                java.lang.String pTarget,
                                                                int pTimeout,
                                                                java.lang.String pAuthentMethod,
                                                                java.security.Key pPrivKey,
                                                                java.security.cert.Certificate pCert,
                                                                boolean pBase64)
                                                         throws org.opensaml.SAMLException,
                                                                java.io.IOException
Parameters:
pAttributes -
Returns:
Throws:
org.opensaml.SAMLException
java.io.IOException


Copyright © 2004-2007 52 North. All Rights Reserved.