org.apache.ws.security.str
Interface STRParser

All Known Implementing Classes:
DerivedKeyTokenSTRParser, EncryptedKeySTRParser, SecurityTokenRefSTRParser, SignatureSTRParser

public interface STRParser

This interface describes a pluggable way of extracting credentials from SecurityTokenReference elements. The implementations are used by various processors.


Method Summary
 X509Certificate[] getCertificates()
          Get the X509Certificates associated with this SecurityTokenReference
 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.
 

Method Detail

parseSecurityTokenReference

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

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

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

Returns:
the X509Certificates associated with this SecurityTokenReference

getPrincipal

Principal getPrincipal()
Get the Principal associated with this SecurityTokenReference

Returns:
the Principal associated with this SecurityTokenReference

getPublicKey

PublicKey getPublicKey()
Get the PublicKey associated with this SecurityTokenReference

Returns:
the PublicKey associated with this SecurityTokenReference

getSecretKey

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

Returns:
the Secret Key associated with this SecurityTokenReference

isTrustedCredential

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


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