org.apache.ws.security.str
Class EncryptedKeySTRParser

java.lang.Object
  extended by org.apache.ws.security.str.EncryptedKeySTRParser
All Implemented Interfaces:
STRParser

public class EncryptedKeySTRParser
extends Object
implements STRParser

This implementation of STRParser is for parsing a SecurityTokenReference element, found in the KeyInfo element associated with an EncryptedKey element


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.ws.security.str.STRParser
STRParser.REFERENCE_TYPE
 
Constructor Summary
EncryptedKeySTRParser()
           
 
Method Summary
 X509Certificate[] getCertificates()
          Get the X509Certificates associated with this SecurityTokenReference
 STRParser.REFERENCE_TYPE getCertificatesReferenceType()
          Get how the certificates were referenced
 Principal getPrincipal()
          Get the Principal associated with this SecurityTokenReference
 PublicKey getPublicKey()
          Get the PublicKey associated with this SecurityTokenReference
 byte[] getSecretKey()
          Get the Secret Key associated with this SecurityTokenReference
 boolean isTrustedCredential()
          Get whether the returned credential is already trusted or not.
 void parseSecurityTokenReference(Element strElement, RequestData data, WSDocInfo wsDocInfo, Map<String,Object> parameters)
          Parse a SecurityTokenReference element and extract credentials.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EncryptedKeySTRParser

public EncryptedKeySTRParser()
Method Detail

parseSecurityTokenReference

public void parseSecurityTokenReference(Element strElement,
                                        RequestData data,
                                        WSDocInfo wsDocInfo,
                                        Map<String,Object> parameters)
                                 throws WSSecurityException
Parse a SecurityTokenReference element and extract credentials.

Specified by:
parseSecurityTokenReference in interface STRParser
Parameters:
strElement - The SecurityTokenReference element
data - the RequestData associated with the request
wsDocInfo - The WSDocInfo object to access previous processing results
parameters - A set of implementation-specific parameters
Throws:
WSSecurityException

getCertificates

public X509Certificate[] getCertificates()
Get the X509Certificates associated with this SecurityTokenReference

Specified by:
getCertificates in interface STRParser
Returns:
the X509Certificates associated with this SecurityTokenReference

getPrincipal

public Principal getPrincipal()
Get the Principal associated with this SecurityTokenReference

Specified by:
getPrincipal in interface STRParser
Returns:
the Principal associated with this SecurityTokenReference

getPublicKey

public PublicKey getPublicKey()
Get the PublicKey associated with this SecurityTokenReference

Specified by:
getPublicKey in interface STRParser
Returns:
the PublicKey associated with this SecurityTokenReference

getSecretKey

public byte[] getSecretKey()
Get the Secret Key associated with this SecurityTokenReference

Specified by:
getSecretKey in interface STRParser
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.

Specified by:
isTrustedCredential in interface STRParser
Returns:
true if trust has already been verified on the returned Credential

getCertificatesReferenceType

public STRParser.REFERENCE_TYPE getCertificatesReferenceType()
Get how the certificates were referenced

Specified by:
getCertificatesReferenceType in interface STRParser
Returns:
how the certificates were referenced


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.