Package com.sun.xml.wss.impl.policy.mls
Class PrivateKeyBinding
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.PrivateKeyBinding
- All Implemented Interfaces:
SecurityPolicy,Cloneable
Objects of this class act as KeyBindings for AuthenticationTokens such
as AuthenticationTokenPolicy.X509CertificateBinding and
AuthenticationTokenPolicy.SAMLAssertionBinding. When associated with an
AuthenticationToken they represent the PrivateKey associated with the
AuthenticationToken.
-
Field Summary
Fields inherited from class com.sun.xml.wss.impl.policy.mls.WSSPolicy
_featureBinding, _isOptional, _keyBinding, _policyIdentifier, bsp, UUID -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorPrivateKeyBinding(String keyIdentifier, String keyAlgorithm) Constructor -
Method Summary
Modifier and TypeMethodDescriptionclone()clone operatorbooleanequality operatorbooleanequalsIgnoreTargets(WSSPolicy binding) getType()Get the type of the policy.voidsetKeyAlgorithm(String keyAlgorithm) set the KeyAlgorithm of this Private Key.voidsetKeyIdentifier(String keyIdentifier) set the keyIdentifier for the Private KeyvoidsetPrivateKey(PrivateKey privateKey) set the private key instancetoString()Methods 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
-
Constructor Details
-
PrivateKeyBinding
public PrivateKeyBinding()Default constructor -
PrivateKeyBinding
Constructor- Parameters:
keyIdentifier- identifier for the Private KeykeyAlgorithm- identified for the Key Algorithm
-
-
Method Details
-
setKeyIdentifier
set the keyIdentifier for the Private Key- Parameters:
keyIdentifier- Key Identifier for the Private Key
-
getKeyIdentifier
- Returns:
- key identifier for the Private Key
-
setKeyAlgorithm
set the KeyAlgorithm of this Private Key. Implementation Note: This KeyAlgorithm is not used by XWS-Runtime, refer setKeyAlgorithm on X509CertificateBinding, SAMLAssertionBinding, and SymmetricKeyBinding instead.- Parameters:
keyAlgorithm- KeyAlgorithm of this Private Key
-
getKeyAlgorithm
- Returns:
- KeyAlgorithm of this Private Key
-
setPrivateKey
set the private key instance- Parameters:
privateKey- PrivateKey for this PrivateKeyBinding
-
getPrivateKey
- Returns:
- PrivateKey associated with this PrivateKeyBinding
-
equals
equality operator -
equalsIgnoreTargets
- Specified by:
equalsIgnoreTargetsin classWSSPolicy
-
clone
clone operator -
getType
Description copied from interface:SecurityPolicyGet the type of the policy.Implementation Note: Useful to avoid instanceof checks and String.equals checks
- Returns:
- the type of the policy
-
toString
-