BEA Systems, Inc.

BEA WebLogic Server 9.1 API Reference


weblogic.xml.crypto.wss.provider
Interface SecurityTokenHandler

All Known Implementing Classes:
weblogic.xml.crypto.wss.BinarySecurityTokenHandler, weblogic.xml.crypto.wss.UsernameTokenHandler

public interface SecurityTokenHandler

Copyright © 2005 BEA Systems, Inc. All Rights Reserved.

Method Summary
 weblogic.xml.crypto.common.keyinfo.KeyProvider getKeyProvider(SecurityToken token, MessageContext ctx)
           
 QName[] getQNames()
          Returns an array of QNames of the SecurityTokens this factory can create from an according DOM node.
 SecurityToken getSecurityToken(SecurityTokenReference str, MessageContext ctx)
           
 SecurityToken getSecurityToken(String valueType, Object credentials, ContextHandler ctxHandler)
           
 SecurityToken getSecurityToken(String valueType, String issuer, Purpose p, ContextHandler ctxHandler)
           
 SecurityTokenReference getSTR(QName STRType, String valueType, SecurityToken token)
          Creates a SecurityTokenReference from a SecurityToken or Credential.
 Subject getSubject(SecurityToken token, MessageContext msgCtx)
           
 String[] getValueTypes()
          Returns an array of ValueType URIs of the SecurityTokens this factory can create from an according DOM node.
 boolean matches(SecurityToken token, String tokenType, String issuerName, ContextHandler ctxHandler, Purpose p)
           
 SecurityToken newSecurityToken(Node node)
          Creates a SecurityToken from a node.
 SecurityTokenReference newSecurityTokenReference(Node node)
           
 weblogic.xml.crypto.wss.SecurityTokenValidateResult validateProcessed(SecurityToken token, MessageContext ctx)
           
 weblogic.xml.crypto.wss.SecurityTokenValidateResult validateUnmarshalled(SecurityToken token, MessageContext ctx)
           
 

Method Detail

getKeyProvider

public weblogic.xml.crypto.common.keyinfo.KeyProvider getKeyProvider(SecurityToken token,
                                                                     MessageContext ctx)

getQNames

public QName[] getQNames()
Returns an array of QNames of the SecurityTokens this factory can create from an according DOM node. The factory will be used for creating SecurityTokens from element nodes with QNames matching any in the array. SecurityTokenFactories that handle custom ValueTypes for Binary Security Tokens should return an empty array here and use getValueTypes() to return the ValueType URIs.

Returns:
array of QNames of SecurityTokens this factory can create

getSecurityToken

public SecurityToken getSecurityToken(SecurityTokenReference str,
                                      MessageContext ctx)
                               throws weblogic.xml.crypto.wss.WSSecurityException
Throws:
weblogic.xml.crypto.wss.WSSecurityException

getSecurityToken

public SecurityToken getSecurityToken(String valueType,
                                      Object credentials,
                                      ContextHandler ctxHandler)
                               throws weblogic.xml.crypto.wss.WSSecurityException
Throws:
weblogic.xml.crypto.wss.WSSecurityException

getSecurityToken

public SecurityToken getSecurityToken(String valueType,
                                      String issuer,
                                      Purpose p,
                                      ContextHandler ctxHandler)
                               throws weblogic.xml.crypto.wss.WSSecurityException
Throws:
weblogic.xml.crypto.wss.WSSecurityException

getSTR

public SecurityTokenReference getSTR(QName STRType,
                                     String valueType,
                                     SecurityToken token)
                              throws weblogic.xml.crypto.wss.WSSecurityException
Creates a SecurityTokenReference from a SecurityToken or Credential. If STRType is WSSConstants.REFERENCE_QNAME, the implementation can set the URI on the SecurityTokenReference. If it does and if the URI points to the SecurityToken, it must also set the Id on the SecurityToken accordingly. If the URI is not set, the WSS runtime will set the SecurityTokenReference URI and the SecurityToken Id.

Parameters:
STRType - QName of the child element of SecurityTokenReference that specifies the reference mechanism. Allowed values are WSSConstants.REFERENCE_QNAME, WSSConstants.EMBEDDED_QNAME, and WSSConstants.KEY_IDENTIFIER_QNAME.
valueType - ValueType attribute used in Reference or KeyIdentifier child element of SecurityTokenReference.
token - SecurityToken to create the SecurityTokenReference from.
Returns:
The SecurityTokenReference.
Throws:
weblogic.xml.crypto.wss.WSSecurityException

getSubject

public Subject getSubject(SecurityToken token,
                          MessageContext msgCtx)
                   throws weblogic.xml.crypto.wss.WSSecurityException
Throws:
weblogic.xml.crypto.wss.WSSecurityException

getValueTypes

public String[] getValueTypes()
Returns an array of ValueType URIs of the SecurityTokens this factory can create from an according DOM node. See also getQNames.

Returns:
array of ValueType URIs of SecurityTokens this factory can create

matches

public boolean matches(SecurityToken token,
                       String tokenType,
                       String issuerName,
                       ContextHandler ctxHandler,
                       Purpose p)

newSecurityToken

public SecurityToken newSecurityToken(Node node)
                               throws weblogic.xml.crypto.api.MarshalException
Creates a SecurityToken from a node. This can either just instantiate the SecurityToken or instantiate and unmarshal it from the node. In the former case the unmarshalling can be done in SecurityToken.unmarshal(Node node).

Parameters:
node - the node the SecurityToken is created from
Returns:
the SecurityToken
Throws:
weblogic.xml.crypto.api.MarshalException

newSecurityTokenReference

public SecurityTokenReference newSecurityTokenReference(Node node)
                                                 throws weblogic.xml.dom.marshal.MarshalException
Throws:
weblogic.xml.dom.marshal.MarshalException

validateProcessed

public weblogic.xml.crypto.wss.SecurityTokenValidateResult validateProcessed(SecurityToken token,
                                                                             MessageContext ctx)

validateUnmarshalled

public weblogic.xml.crypto.wss.SecurityTokenValidateResult validateUnmarshalled(SecurityToken token,
                                                                                MessageContext ctx)
                                                 throws weblogic.xml.crypto.wss.WSSecurityException
Throws:
weblogic.xml.crypto.wss.WSSecurityException

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs91
Copyright 2005 BEA Systems Inc.