Package org.apache.wss4j.dom.str
Class STRParserResult
java.lang.Object
org.apache.wss4j.dom.str.STRParserResult
This class holds the results from parsing a SecurityTokenReference Element by a STRParser implementation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the X509Certificates associated with this SecurityTokenReferenceGet how the certificates were referencedGet the Principal associated with this SecurityTokenReferenceGet the PublicKey associated with this SecurityTokenReferencebyte[]Get the Secret Key associated with this SecurityTokenReferencebooleanGet whether the secret key was recovered from an EncryptedKey, rather than taken from a token or supplied by the CallbackHandler.booleanGet whether the returned credential is already trusted or not.voidsetCerts(X509Certificate[] certs) voidsetPrincipal(Principal principal) voidsetPublicKey(PublicKey publicKey) voidsetReferenceType(STRParser.REFERENCE_TYPE referenceType) voidsetSecretKey(byte[] secretKey) voidsetSecretKeyFromEncryptedKey(boolean secretKeyFromEncryptedKey) voidsetTrustedCredential(boolean trustedCredential)
-
Constructor Details
-
STRParserResult
public STRParserResult()
-
-
Method Details
-
getCertificates
Get the X509Certificates associated with this SecurityTokenReference- Returns:
- the X509Certificates associated with this SecurityTokenReference
-
getPrincipal
Get the Principal associated with this SecurityTokenReference- Returns:
- the Principal associated with this SecurityTokenReference
-
getPublicKey
Get the PublicKey associated with this SecurityTokenReference- Returns:
- the PublicKey associated with this SecurityTokenReference
-
getSecretKey
public byte[] getSecretKey()Get the Secret Key associated with this SecurityTokenReference- Returns:
- the Secret Key associated with this SecurityTokenReference
-
isTrustedCredential
public boolean isTrustedCredential()Get whether the returned credential is already trusted or not. This is currently applicable in the case of a credential extracted from a trusted HOK SAML Assertion, and a BinarySecurityToken that has been processed by a Validator. In these cases, the SignatureProcessor does not need to verify trust on the credential.- Returns:
- true if trust has already been verified on the returned Credential
-
isSecretKeyFromEncryptedKey
public boolean isSecretKeyFromEncryptedKey()Get whether the secret key was recovered from an EncryptedKey, rather than taken from a token or supplied by the CallbackHandler. Such a key is the product of a private key operation on ciphertext the sender chose, so a caller must not let the sender tell from the response whether that operation succeeded.- Returns:
- true if the secret key was recovered from an EncryptedKey
-
getCertificatesReferenceType
Get how the certificates were referenced- Returns:
- how the certificates were referenced
-
setCerts
-
setSecretKey
public void setSecretKey(byte[] secretKey) -
setPublicKey
-
setPrincipal
-
setTrustedCredential
public void setTrustedCredential(boolean trustedCredential) -
setSecretKeyFromEncryptedKey
public void setSecretKeyFromEncryptedKey(boolean secretKeyFromEncryptedKey) -
setReferenceType
-