Package com.sun.xml.wss.impl.policy.mls
Class AuthenticationTokenPolicy.SAMLAssertionBinding
java.lang.Object
com.sun.xml.wss.impl.policy.MLSPolicy
com.sun.xml.wss.impl.policy.mls.WSSPolicy
com.sun.xml.wss.impl.policy.mls.KeyBindingBase
com.sun.xml.wss.impl.policy.mls.AuthenticationTokenPolicy.SAMLAssertionBinding
- All Implemented Interfaces:
LazyKeyBinding,SecurityPolicy,Cloneable
- Enclosing class:
- AuthenticationTokenPolicy
public static class AuthenticationTokenPolicy.SAMLAssertionBinding
extends KeyBindingBase
implements LazyKeyBinding
A policy representing a SAML Assertion. An instance of
this class can be used as concrete feature binding for an
AuthenticationTokenPolicy.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringHolder-Of-Key Subject ConfirmationMethodstatic final StringSender-Vouches Subject ConfirmationMethodstatic final Stringstatic final Stringstatic final StringFields inherited from class com.sun.xml.wss.impl.policy.mls.KeyBindingBase
claims, claimsDialect, INCLUDE_ALWAYS, INCLUDE_ALWAYS_TO_RECIPIENT, INCLUDE_ALWAYS_TO_RECIPIENT_VER2, INCLUDE_ALWAYS_VER2, INCLUDE_NEVER, INCLUDE_NEVER_VER2, INCLUDE_ONCE, INCLUDE_ONCE_VER2, includeToken, issuer, policyTokenFields inherited from class com.sun.xml.wss.impl.policy.mls.WSSPolicy
_featureBinding, _isOptional, _keyBinding, _policyIdentifier, bsp, UUID -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorSAMLAssertionBinding(String type, String keyIdentifier, String authorityIdentifier, String referenceType) Constructor -
Method Summary
Modifier and TypeMethodDescriptionclone()clone operatrorbooleanequals operatorbooleanequalsIgnoreTargets(WSSPolicy binding) A CallbackHandler can choose to just set the AuthorityBinding and the AssertionId, and not set the actual assertiongetSTRID()getType()Get the type of the policy.Create and set the KeyBinding for this WSSPolicy to a PrivateKeyBindingvoidsetAssertion(XMLStreamReader reader) voidsetAssertion(Element assertion) set the SAML AssertionvoidsetAssertionId(String id) set the AssertionId for the possibly remote assertion A CallbackHandler can choose to just set the AuthorityBinding and the AssertionId, and not set the actual assertionvoidsetAssertionType(String type) set the SubjectConfirmation type of the SAML assertionvoidsetAuthorityBinding(Element authorityBinding) set the SAML AuthorityBinding element, identifying a remote assertionvoidset the abstract identifier for the issuing authorityvoidsetKeyAlgorithm(String algorithm) set the keyAlgorithm to be usedvoidset the abstract identifier for the Confirmation KeyvoidvoidsetReferenceType(String rtype) set the ReferenceType to be used for references to the SAML AssertionvoidsetSAMLVersion(String ver) voidtoString()Methods inherited from class com.sun.xml.wss.impl.policy.mls.KeyBindingBase
getClaims, getIncludeToken, getIssuer, policyTokenWasSet, setClaims, setIncludeToken, setIssuer, setPolicyTokenFlagMethods inherited from class com.sun.xml.wss.impl.policy.mls.WSSPolicy
getFeatureBinding, getKeyBinding, getPolicyIdentifier, getUUID, isBSP, isBSP, isOptional, isOptional, setFeatureBinding, setKeyBinding, setPolicyIdentifier, setUUIDMethods inherited from class com.sun.xml.wss.impl.policy.MLSPolicy
isReadOnly, isReadOnly
-
Field Details
-
V10_ASSERTION
- See Also:
-
V11_ASSERTION
- See Also:
-
V20_ASSERTION
- See Also:
-
SV_ASSERTION
Sender-Vouches Subject ConfirmationMethod- See Also:
-
HOK_ASSERTION
Holder-Of-Key Subject ConfirmationMethod- See Also:
-
-
Constructor Details
-
SAMLAssertionBinding
public SAMLAssertionBinding()Default constructor -
SAMLAssertionBinding
public SAMLAssertionBinding(String type, String keyIdentifier, String authorityIdentifier, String referenceType) Constructor- Parameters:
type- the SubjectConfirmation type of the SAML assertion, one of SV, HOKkeyIdentifier- an abstract identifier for the Confirmation KeyauthorityIdentifier- an abstract identifier for the issuing authorityreferenceType- the reference type for references to the SAML Assertion, should be one of KeyIdentifier, Embedded reference type as defined by WSS SAML Token profile 1.0.
-
-
Method Details
-
setAssertionType
set the SubjectConfirmation type of the SAML assertion- Parameters:
type- the SubjectConfirmation type of the SAML assertion, one of SV, HOK
-
setSAMLVersion
-
getSAMLVersion
-
newPrivateKeyBinding
Create and set the KeyBinding for this WSSPolicy to a PrivateKeyBinding- Returns:
- a new PrivateKeyBinding as a KeyBinding for this WSSPolicy
-
setKeyIdentifier
set the abstract identifier for the Confirmation Key- Parameters:
ki- the abstract identifier for the Confirmation Key
-
setAuthorityIdentifier
set the abstract identifier for the issuing authority- Parameters:
uri- the URI of the Assertion Issuer
-
setReferenceType
set the ReferenceType to be used for references to the SAML Assertion- Parameters:
rtype- reference type (one of KeyIdentifier, Embedded)
-
setAuthorityBinding
set the SAML AuthorityBinding element, identifying a remote assertion -
setAssertion
set the SAML Assertion- Parameters:
assertion- the SAML Assertion
-
setAssertion
-
setKeyAlgorithm
set the keyAlgorithm to be used- Parameters:
algorithm- the keyAlgorithm to be used
-
getKeyAlgorithm
- Returns:
- key algorithm
-
getReferenceType
- Returns:
- reference type
-
getAssertionType
- Returns:
- type of SAMLAssertion (SV/HOK)
-
getKeyIdentifier
- Returns:
- identifier to key bound to the Assertion
-
getAuthorityIdentifier
- Returns:
- identifier to Authority issueing the Assertion
-
getAuthorityBinding
- Returns:
- authority binding component of the assertion
-
getAssertion
- Returns:
- SAML assertion
-
getAssertionReader
-
equals
equals operator -
equalsIgnoreTargets
- Specified by:
equalsIgnoreTargetsin classWSSPolicy
-
clone
Description copied from class:WSSPolicyclone operatror -
getType
Description copied from interface:SecurityPolicyGet the type of the policy.Implementation Note: Useful to avoid instanceof checks and String.equals checks
- Specified by:
getTypein interfaceSecurityPolicy- Returns:
- the type of the policy
-
setSTRID
-
getSTRID
- Specified by:
getSTRIDin interfaceLazyKeyBinding
-
setAssertionId
set the AssertionId for the possibly remote assertion A CallbackHandler can choose to just set the AuthorityBinding and the AssertionId, and not set the actual assertion- Parameters:
id- the Assertion Id of the possibly remote SAML Assertion
-
getAssertionId
A CallbackHandler can choose to just set the AuthorityBinding and the AssertionId, and not set the actual assertion- Returns:
- the Assertion ID of the SAML Assertion represented by this Policy
-
toString
-
get_assertion
-
getRealId
- Specified by:
getRealIdin interfaceLazyKeyBinding
-
setRealId
- Specified by:
setRealIdin interfaceLazyKeyBinding
-