Package org.apache.wss4j.dom.validate
Class Credential
- java.lang.Object
-
- org.apache.wss4j.dom.validate.Credential
-
public class Credential extends Object
This class stores various Credential types that can be validated and/or returned by a Validator implementation. It also stores an optional Principal object which can provide context information to the validators.
-
-
Constructor Summary
Constructors Constructor Description Credential()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BinarySecuritygetBinarySecurityToken()Get the BinarySecurityToken to be validatedX509Certificate[]getCertificates()Get an X509Certificate chain to be validatedObjectgetDelegationCredential()PrincipalgetPrincipal()Get the principalPublicKeygetPublicKey()Get a PublicKey to be validatedSamlAssertionWrappergetSamlAssertion()Get an SamlAssertionWrapper to be validatedbyte[]getSecretKey()Get a SecretKey (byte[]) to be validatedSecurityContextTokengetSecurityContextToken()Get a SecurityContextToken to be validatedSubjectgetSubject()Get the subject that may result from the Validation processTimestampgetTimestamp()Get a Timestamp to be validatedSamlAssertionWrappergetTransformedToken()Get an SamlAssertionWrapper instance which corresponds to a Transformed Token.UsernameTokengetUsernametoken()Get a UsernameToken to be validatedvoidsetBinarySecurityToken(BinarySecurity binarySecurityToken)Set the BinarySecurityToken to be validatedvoidsetCertificates(X509Certificate[] certs)Set an X509Certificate chain to be validatedvoidsetDelegationCredential(Object delegationCredential)voidsetPrincipal(Principal principal)Set the principal that supplies context information to the validators.voidsetPublicKey(PublicKey publicKey)Set a PublicKey to be validatedvoidsetSamlAssertion(SamlAssertionWrapper samlAssertion)Set an SamlAssertionWrapper to be validatedvoidsetSecretKey(byte[] secretKey)Set a SecretKey (byte[]) to be validatedvoidsetSecurityContextToken(SecurityContextToken securityContextToken)Set a SecurityContextToken to be validatedvoidsetSubject(Subject subject)Set the subject that may result from the Validation processvoidsetTimestamp(Timestamp timestamp)Set a Timestamp to be validatedvoidsetTransformedToken(SamlAssertionWrapper transformedToken)Set an SamlAssertionWrapper instance which corresponds to a Transformed Token.voidsetUsernametoken(UsernameToken usernametoken)Set a UsernameToken to be validated
-
-
-
Method Detail
-
setSecurityContextToken
public void setSecurityContextToken(SecurityContextToken securityContextToken)
Set a SecurityContextToken to be validated- Parameters:
securityContextToken- a SecurityContextToken to be validated
-
getSecurityContextToken
public SecurityContextToken getSecurityContextToken()
Get a SecurityContextToken to be validated- Returns:
- a SecurityContextToken to be validated
-
setSecretKey
public void setSecretKey(byte[] secretKey)
Set a SecretKey (byte[]) to be validated- Parameters:
secretKey- a SecretKey (byte) to be validated
-
getSecretKey
public byte[] getSecretKey()
Get a SecretKey (byte[]) to be validated- Returns:
- a SecretKey (byte[]) to be validated
-
setPublicKey
public void setPublicKey(PublicKey publicKey)
Set a PublicKey to be validated- Parameters:
publicKey- a PublicKey to be validated
-
getPublicKey
public PublicKey getPublicKey()
Get a PublicKey to be validated- Returns:
- a PublicKey to be validated
-
setCertificates
public void setCertificates(X509Certificate[] certs)
Set an X509Certificate chain to be validated- Parameters:
certs- an X509Certificate chain to be validated
-
getCertificates
public X509Certificate[] getCertificates()
Get an X509Certificate chain to be validated- Returns:
- an X509Certificate chain to be validated
-
setTimestamp
public void setTimestamp(Timestamp timestamp)
Set a Timestamp to be validated- Parameters:
timestamp- a Timestamp to be validated
-
getTimestamp
public Timestamp getTimestamp()
Get a Timestamp to be validated- Returns:
- a Timestamp to be validated
-
setUsernametoken
public void setUsernametoken(UsernameToken usernametoken)
Set a UsernameToken to be validated- Parameters:
usernametoken- a UsernameToken to be validated
-
getUsernametoken
public UsernameToken getUsernametoken()
Get a UsernameToken to be validated- Returns:
- a UsernameToken to be validated
-
setBinarySecurityToken
public void setBinarySecurityToken(BinarySecurity binarySecurityToken)
Set the BinarySecurityToken to be validated- Parameters:
binarySecurityToken- the BinarySecurityToken to be validated
-
getBinarySecurityToken
public BinarySecurity getBinarySecurityToken()
Get the BinarySecurityToken to be validated- Returns:
- the BinarySecurityToken to be validated
-
setSamlAssertion
public void setSamlAssertion(SamlAssertionWrapper samlAssertion)
Set an SamlAssertionWrapper to be validated- Parameters:
samlAssertion- an SamlAssertionWrapper to be validated
-
getSamlAssertion
public SamlAssertionWrapper getSamlAssertion()
Get an SamlAssertionWrapper to be validated- Returns:
- an SamlAssertionWrapper to be validated
-
setTransformedToken
public void setTransformedToken(SamlAssertionWrapper transformedToken)
Set an SamlAssertionWrapper instance which corresponds to a Transformed Token.- Parameters:
transformedToken- a transformed SamlAssertionWrapper instance
-
getTransformedToken
public SamlAssertionWrapper getTransformedToken()
Get an SamlAssertionWrapper instance which corresponds to a Transformed Token.- Returns:
- a transformed SamlAssertionWrapper instance
-
setPrincipal
public void setPrincipal(Principal principal)
Set the principal that supplies context information to the validators.- Parameters:
principal- the principal that supplies context information to the validators
-
getPrincipal
public Principal getPrincipal()
Get the principal- Returns:
- the principal
-
setSubject
public void setSubject(Subject subject)
Set the subject that may result from the Validation process- Parameters:
subject- the subject that may result from the Validation process
-
getSubject
public Subject getSubject()
Get the subject that may result from the Validation process- Returns:
- the subject that may result from the Validation process
-
getDelegationCredential
public Object getDelegationCredential()
-
setDelegationCredential
public void setDelegationCredential(Object delegationCredential)
-
-