public class SAML2Token extends Object implements SecurityToken
SAML2Token
represents a SAML2
token that can be inserted into web services security header
for message level security.
This class implements SecurityToken
and can be
created through security token factory.
LIBERTY_ASSERTION_TOKEN, WSS_FAM_SSO_TOKEN, WSS_KERBEROS_TOKEN, WSS_SAML_TOKEN, WSS_SAML2_TOKEN, WSS_USERNAME_TOKEN, WSS_X509_TOKEN
Constructor and Description |
---|
SAML2Token(Element element) |
SAML2Token(SAML2TokenSpec spec,
SSOToken ssoToken)
Constructor that initializes the SAML2Token.
|
Modifier and Type | Method and Description |
---|---|
Assertion |
getAssertion() |
String |
getTokenType()
Returns the security token type.
|
X509Certificate |
getX509Certificate()
Returns X509 certificate of the authenticated subject.
|
boolean |
isSenderVouches()
Returns true if the SAML2 token is of type sender vouches
|
void |
sign(String alias)
Signs the SAML2 Token.
|
Element |
toDocumentElement()
Returns DOM element for the SAML2 token
|
public SAML2Token(SAML2TokenSpec spec, SSOToken ssoToken) throws SecurityException
SecurityException
public SAML2Token(Element element) throws SAML2Exception
SAML2Exception
public String getTokenType()
getTokenType
in interface SecurityToken
public Assertion getAssertion()
public X509Certificate getX509Certificate() throws SecurityException
SecurityException
public Element toDocumentElement() throws SecurityException
toDocumentElement
in interface SecurityToken
Element
elementSecurityException
- if there is a failure.public void sign(String alias) throws SecurityException
SecurityException
- if unable to sign the assertion.public boolean isSenderVouches()
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.