Package com.sun.identity.wss.security
Class AssertionToken
- java.lang.Object
-
- com.sun.identity.wss.security.AssertionToken
-
- All Implemented Interfaces:
SecurityToken
public class AssertionToken extends Object implements SecurityToken
This class implements the interfaceSecurityTokenfor the SAML Assertions.
-
-
Field Summary
-
Fields inherited from interface com.sun.identity.wss.security.SecurityToken
LIBERTY_ASSERTION_TOKEN, WSS_FAM_SSO_TOKEN, WSS_KERBEROS_TOKEN, WSS_SAML_TOKEN, WSS_SAML2_TOKEN, WSS_USERNAME_TOKEN, WSS_X509_TOKEN
-
-
Constructor Summary
Constructors Constructor Description AssertionToken(AssertionTokenSpec spec, SSOToken ssoToken)Constructor that initializes the AssertionToken.AssertionToken(Element element)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssertiongetAssertion()Returns the generatedSAML Assertion.StringgetTokenType()Returns the security token type.X509CertificategetX509Certificate()Returns X509 certificate of the authenticated subject.booleanisSenderVouches()voidsign(String alias)Signs the Assertion Token.ElementtoDocumentElement()Convert the security token into DOM Object.
-
-
-
Constructor Detail
-
AssertionToken
public AssertionToken(AssertionTokenSpec spec, SSOToken ssoToken) throws SecurityException
Constructor that initializes the AssertionToken.- Throws:
SecurityException
-
AssertionToken
public AssertionToken(Element element) throws SAMLException
- Throws:
SAMLException
-
-
Method Detail
-
getTokenType
public String getTokenType()
Returns the security token type.- Specified by:
getTokenTypein interfaceSecurityToken- Returns:
- String SAMLToken type.
-
toDocumentElement
public Element toDocumentElement() throws SecurityException
Convert the security token into DOM Object.- Specified by:
toDocumentElementin interfaceSecurityToken- Returns:
- the DOM Document Element.
- Throws:
SecurityException- if any failure is occured.
-
isSenderVouches
public boolean isSenderVouches()
-
getX509Certificate
public X509Certificate getX509Certificate() throws SecurityException
Returns X509 certificate of the authenticated subject.- Throws:
SecurityException
-
sign
public void sign(String alias) throws SecurityException
Signs the Assertion Token.- Throws:
SecurityException- if unable to sign the assertion.
-
getAssertion
public Assertion getAssertion()
Returns the generatedSAML Assertion.- Returns:
Assertiongenerated saml assertion.
-
-