Oracle Fusion Middleware
Oracle WebLogic Server API Reference
11g Release 1 (10.3.4)

Part Number E13941-04

weblogic.wsee.security.saml
Class AbstractSAMLTokenHandler

java.lang.Object
  extended by weblogic.wsee.security.saml.AbstractSAMLTokenHandler
All Implemented Interfaces:
SecurityTokenHandler
Direct Known Subclasses:
SAML2TokenHandler, SAMLTokenHandler

public abstract class AbstractSAMLTokenHandler
extends Object
implements SecurityTokenHandler

Token handler of both SAML 2.0 and SAML 1.1 token User: sychang Date: July 25, 2006 Time: 12:58:51 PM


Constructor Summary
AbstractSAMLTokenHandler()
          default constructor
 
Method Summary
 weblogic.xml.crypto.common.keyinfo.KeyProvider getKeyProvider(SecurityToken token, MessageContext ctx)
          get the saml key provider
abstract  QName[] getQNames()
          get QNames of saml assertion
 SecurityToken getSecurityToken(SecurityTokenReference str, MessageContext ctx)
          get security token based on referenece
 SecurityToken getSecurityToken(String valueType, Object credentials, ContextHandler ctxHandler)
          create a new SAML token that can be either SAML TP 1.0 or 1.1 value types
 SecurityToken getSecurityToken(String valueType, String issuer, Purpose p, ContextHandler ctxHandler)
          Get the Security token from context handler base on the value type.
 SecurityTokenReference getSTR(QName STRType, String valueType, SecurityToken token)
          new saml token reference
 Subject getSubject(SecurityToken token, MessageContext msgCtx)
          Get authenticated subject from saml token
abstract  String[] getValueTypes()
          SAML value types
abstract  boolean isSaml2()
           
abstract  boolean isSupportedTokenType(String tokenType)
           
abstract  boolean isSupportedValueType(String valueType)
           
 boolean matches(SecurityToken token, String tokenType, String issuerName, ContextHandler ctxHandler, Purpose p)
          check if the token should be handled by saml token handler
 SecurityToken newSecurityToken(Node node)
          Create a new SAML token.
 SecurityTokenReference newSecurityTokenReference(Node node)
          Create a new securityTokenReference of given saml assertion
 SecurityTokenValidateResult validateProcessed(SecurityToken token, MessageContext ctx)
          get SecurityTokenValidateResult of processed token
 SecurityTokenValidateResult validateUnmarshalled(SecurityToken token, MessageContext ctx)
          get SecurityTokenValidateResult for unmarshalled token
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSAMLTokenHandler

public AbstractSAMLTokenHandler()
default constructor

Method Detail

getQNames

public abstract QName[] getQNames()
get QNames of saml assertion

Specified by:
getQNames in interface SecurityTokenHandler
Returns:
QNames

getValueTypes

public abstract String[] getValueTypes()
SAML value types

Specified by:
getValueTypes in interface SecurityTokenHandler
Returns:
value types

isSupportedTokenType

public abstract boolean isSupportedTokenType(String tokenType)

isSupportedValueType

public abstract boolean isSupportedValueType(String valueType)

isSaml2

public abstract boolean isSaml2()

getSecurityToken

public SecurityToken getSecurityToken(String valueType,
                                      Object credentials,
                                      ContextHandler ctxHandler)
create a new SAML token that can be either SAML TP 1.0 or 1.1 value types

Specified by:
getSecurityToken in interface SecurityTokenHandler
Parameters:
valueType - saml token type can be either SAML TP 1.0 or 1.1 value types
credentials - saml credentials
ctxHandler - context handler, it must to have the idecation of SAML 1.1 or SAML 2.0
Returns:
SAML token
Throws:
WSSecurityException - occurs during process

getSecurityToken

public SecurityToken getSecurityToken(String valueType,
                                      String issuer,
                                      Purpose p,
                                      ContextHandler ctxHandler)
Get the Security token from context handler base on the value type.

Specified by:
getSecurityToken in interface SecurityTokenHandler
Parameters:
valueType - saml token type can be either SAML TP 1.0 or 1.1 value types
issuer -
p -
ctxHandler -
Returns:
SAML Token
Throws:
WSSecurityException

getSTR

public SecurityTokenReference getSTR(QName STRType,
                                     String valueType,
                                     SecurityToken token)
new saml token reference

Specified by:
getSTR in interface SecurityTokenHandler
Parameters:
STRType - type of security token reference
valueType - SAML_VALUE_TYPE
token - saml token
Returns:
SecurityTokenReference of saml token

newSecurityToken

public SecurityToken newSecurityToken(Node node)
                               throws weblogic.xml.crypto.api.MarshalException
Create a new SAML token.

Specified by:
newSecurityToken in interface SecurityTokenHandler
Parameters:
node - node of saml assertion
Returns:
saml token object
Throws:
weblogic.xml.crypto.api.MarshalException

newSecurityTokenReference

public SecurityTokenReference newSecurityTokenReference(Node node)
                                                 throws weblogic.xml.dom.marshal.MarshalException
Create a new securityTokenReference of given saml assertion

Specified by:
newSecurityTokenReference in interface SecurityTokenHandler
Parameters:
node - node of saml assertion
Returns:
SecurityTokenReference of saml token
Throws:
weblogic.xml.dom.marshal.MarshalException - occurs during process

getKeyProvider

public weblogic.xml.crypto.common.keyinfo.KeyProvider getKeyProvider(SecurityToken token,
                                                                     MessageContext ctx)
get the saml key provider

Specified by:
getKeyProvider in interface SecurityTokenHandler
Parameters:
token - saml token
ctx - message context
Returns:
SAMLKeyProvider

getSecurityToken

public SecurityToken getSecurityToken(SecurityTokenReference str,
                                      MessageContext ctx)
get security token based on referenece

Specified by:
getSecurityToken in interface SecurityTokenHandler
Parameters:
str - SecurityTokenReference of saml token
ctx - message context
Returns:
saml token
Throws:
WSSecurityException - occurs during process

validateUnmarshalled

public SecurityTokenValidateResult validateUnmarshalled(SecurityToken token,
                                                        MessageContext ctx)
get SecurityTokenValidateResult for unmarshalled token

Specified by:
validateUnmarshalled in interface SecurityTokenHandler
Parameters:
token - saml token
ctx - message context
Returns:
SecurityTokenValidateResult

validateProcessed

public SecurityTokenValidateResult validateProcessed(SecurityToken token,
                                                     MessageContext ctx)
get SecurityTokenValidateResult of processed token

Specified by:
validateProcessed in interface SecurityTokenHandler
Parameters:
token - saml token
ctx - message context
Returns:
SecurityTokenValidateResult

matches

public boolean matches(SecurityToken token,
                       String tokenType,
                       String issuerName,
                       ContextHandler ctxHandler,
                       Purpose p)
check if the token should be handled by saml token handler

Specified by:
matches in interface SecurityTokenHandler
Parameters:
token - token to check
tokenType - token type to check
issuerName - issuer of the saml token
ctxHandler - context handler
p - purpose
Returns:
true if it's a saml token

getSubject

public Subject getSubject(SecurityToken token,
                          MessageContext msgCtx)
Get authenticated subject from saml token

Specified by:
getSubject in interface SecurityTokenHandler
Parameters:
token - saml token
msgCtx - message context
Returns:
subject in the SAML Token
Throws:
WSSecurityException - occurs during process

Copyright 1996, 2010, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Oracle WebLogic Server API Reference
11g Release 1 (10.3.4)

Part Number E13941-04