PicketLink Federation Common Server Bindings for JBoss AS 2.1.6.Final-redhat-2

org.picketlink.trust.jbossws.handler
Class AbstractPicketLinkTrustHandler<C extends LogicalMessageContext>

java.lang.Object
  extended by org.picketlink.trust.jbossws.handler.AbstractPicketLinkTrustHandler<C>
All Implemented Interfaces:
Handler, SOAPHandler
Direct Known Subclasses:
AbstractSAML2Handler, AbstractWSAuthenticationHandler, AbstractWSAuthorizationHandler, BinaryTokenHandler, MapBasedTokenHandler, SamlRequestSecurityTokenHandler

public abstract class AbstractPicketLinkTrustHandler<C extends LogicalMessageContext>
extends Object
implements SOAPHandler

Abstract base class for the PicketLink Trust Handlers

This class implements directly the SOAPHandler interface because the GenericSOAPHandler package name changes between JBossWS versions.

Since:
Apr 11, 2011
Author:
Anil.Saldhana@redhat.com, Pedro Silva

Field Summary
protected static String AUTHZ_MGR_LOOKUP
           
protected static Set<QName> headers
           
protected static PicketLinkLogger logger
           
protected static String SEC_MGR_LOOKUP
           
 
Constructor Summary
AbstractPicketLinkTrustHandler()
           
 
Method Summary
 void close(MessageContext context)
           
protected  Element getAssertionFromSubject()
          Get the SAML Assertion from the subject
 Set<QName> getHeaders()
           
protected  String getSecurityDomainName(MessageContext msgContext)
          Returns the security domain name configured for the deployment.
protected  Element getSecurityHeaderElement(Document document)
          Given a Document, create the WSSE element
protected  javax.servlet.ServletContext getServletContext(MessageContext msgContext)
          Utility method to get the ServletContext from the specified MessageContext.
protected  String getUsername(Element nameID)
          Given the NameID Element, return the user name
 boolean handleFault(MessageContext context)
           
protected  boolean handleInbound(MessageContext msgContext)
           
 boolean handleMessage(MessageContext msgContext)
          Handles the incoming message and decides which method should be called: handleOutbound or handleInbound
protected  boolean handleOutbound(MessageContext msgContext)
           
protected  Object lookupJNDI(String str)
           
protected  void trace(MessageContext msgContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final PicketLinkLogger logger

headers

protected static Set<QName> headers

SEC_MGR_LOOKUP

protected static final String SEC_MGR_LOOKUP
See Also:
Constant Field Values

AUTHZ_MGR_LOOKUP

protected static final String AUTHZ_MGR_LOOKUP
See Also:
Constant Field Values
Constructor Detail

AbstractPicketLinkTrustHandler

public AbstractPicketLinkTrustHandler()
Method Detail

getHeaders

public Set<QName> getHeaders()
Specified by:
getHeaders in interface SOAPHandler

getServletContext

protected javax.servlet.ServletContext getServletContext(MessageContext msgContext)

Utility method to get the ServletContext from the specified MessageContext.

Parameters:
msgContext -
Returns:

getSecurityDomainName

protected String getSecurityDomainName(MessageContext msgContext)
                                throws ConfigurationException

Returns the security domain name configured for the deployment.

Parameters:
msgContext -
Returns:
Throws:
ConfigurationException - if no security domain is configured.

getSecurityHeaderElement

protected Element getSecurityHeaderElement(Document document)
Given a Document, create the WSSE element

Parameters:
document -
Returns:

trace

protected void trace(MessageContext msgContext)

getUsername

protected String getUsername(Element nameID)
Given the NameID Element, return the user name

Parameters:
nameID -
Returns:

getAssertionFromSubject

protected Element getAssertionFromSubject()
Get the SAML Assertion from the subject

Returns:

lookupJNDI

protected Object lookupJNDI(String str)

handleMessage

public boolean handleMessage(MessageContext msgContext)

Handles the incoming message and decides which method should be called: handleOutbound or handleInbound

.

Specified by:
handleMessage in interface Handler
Parameters:
msgContext -
Returns:

handleOutbound

protected boolean handleOutbound(MessageContext msgContext)

handleInbound

protected boolean handleInbound(MessageContext msgContext)

handleFault

public boolean handleFault(MessageContext context)
Specified by:
handleFault in interface Handler

close

public void close(MessageContext context)
Specified by:
close in interface Handler

PicketLink Federation Common Server Bindings for JBoss AS 2.1.6.Final-redhat-2

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.