org.jboss.identity.federation.bindings.tomcat.sp
Class SPRedirectFormAuthenticator

java.lang.Object
  extended by org.apache.catalina.valves.ValveBase
      extended by org.apache.catalina.authenticator.AuthenticatorBase
          extended by org.apache.catalina.authenticator.FormAuthenticator
              extended by org.jboss.identity.federation.bindings.tomcat.sp.SPRedirectFormAuthenticator
All Implemented Interfaces:
javax.management.MBeanRegistration, org.apache.catalina.Authenticator, org.apache.catalina.Contained, org.apache.catalina.Lifecycle, org.apache.catalina.Valve
Direct Known Subclasses:
SPRedirectSignatureFormAuthenticator

public class SPRedirectFormAuthenticator
extends org.apache.catalina.authenticator.FormAuthenticator

Authenticator at the Service Provider that handles HTTP/Redirect binding of SAML 2 but falls back on Form Authentication

Since:
Dec 12, 2008
Author:
Anil.Saldhana@redhat.com

Field Summary
protected  SPType spConfiguration
           
 
Fields inherited from class org.apache.catalina.authenticator.FormAuthenticator
characterEncoding, info
 
Fields inherited from class org.apache.catalina.authenticator.AuthenticatorBase
algorithm, cache, context, DEFAULT_ALGORITHM, digest, disableProxyCaching, entropy, lifecycle, random, randomClass, securePagesWithPragma, SESSION_ID_BYTES, sm, sso, started
 
Fields inherited from class org.apache.catalina.valves.ValveBase
container, containerLog, controller, domain, mserver, next, oname
 
Fields inherited from interface org.apache.catalina.Lifecycle
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, DESTROY_EVENT, INIT_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT
 
Constructor Summary
SPRedirectFormAuthenticator()
           
 
Method Summary
 boolean authenticate(org.apache.catalina.connector.Request request, org.apache.catalina.connector.Response response, org.apache.catalina.deploy.LoginConfig loginConfig)
           
protected  java.lang.String createSAMLRequestMessage(java.lang.String relayState, org.apache.catalina.connector.Response response)
           
protected  ResponseType decryptAssertion(ResponseType responseType)
          Subclasses should provide the implementation
protected  java.lang.String getDestination(java.lang.String urlEncodedRequest, java.lang.String urlEncodedRelayState)
           
protected  void isTrusted(java.lang.String issuer)
           
 void start()
           
protected  boolean validate(org.apache.catalina.connector.Request request)
           
 
Methods inherited from class org.apache.catalina.authenticator.FormAuthenticator
forwardToErrorPage, forwardToLoginPage, getCharacterEncoding, getInfo, matchRequest, restoreRequest, savedRequestURL, saveRequest, setCharacterEncoding
 
Methods inherited from class org.apache.catalina.authenticator.AuthenticatorBase
addLifecycleListener, associate, findLifecycleListeners, generateSessionId, getAlgorithm, getCache, getContainer, getDigest, getDisableProxyCaching, getEntropy, getRandom, getRandomClass, getSecurePagesWithPragma, invoke, reauthenticateFromSSO, register, removeLifecycleListener, setAlgorithm, setCache, setContainer, setDisableProxyCaching, setEntropy, setRandomClass, setSecurePagesWithPragma, stop
 
Methods inherited from class org.apache.catalina.valves.ValveBase
backgroundProcess, createObjectName, event, getContainerName, getController, getDomain, getNext, getObjectName, getParentName, postDeregister, postRegister, preDeregister, preRegister, setController, setNext, setObjectName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

spConfiguration

protected SPType spConfiguration
Constructor Detail

SPRedirectFormAuthenticator

public SPRedirectFormAuthenticator()
Method Detail

start

public void start()
           throws org.apache.catalina.LifecycleException
Specified by:
start in interface org.apache.catalina.Lifecycle
Overrides:
start in class org.apache.catalina.authenticator.AuthenticatorBase
Throws:
org.apache.catalina.LifecycleException

authenticate

public boolean authenticate(org.apache.catalina.connector.Request request,
                            org.apache.catalina.connector.Response response,
                            org.apache.catalina.deploy.LoginConfig loginConfig)
                     throws java.io.IOException
Overrides:
authenticate in class org.apache.catalina.authenticator.FormAuthenticator
Throws:
java.io.IOException

createSAMLRequestMessage

protected java.lang.String createSAMLRequestMessage(java.lang.String relayState,
                                                    org.apache.catalina.connector.Response response)
                                             throws java.lang.Exception
Throws:
java.lang.Exception

getDestination

protected java.lang.String getDestination(java.lang.String urlEncodedRequest,
                                          java.lang.String urlEncodedRelayState)

isTrusted

protected void isTrusted(java.lang.String issuer)
                  throws IssuerNotTrustedException
Throws:
IssuerNotTrustedException

validate

protected boolean validate(org.apache.catalina.connector.Request request)
                    throws java.lang.Exception
Throws:
java.lang.Exception

decryptAssertion

protected ResponseType decryptAssertion(ResponseType responseType)
                                 throws java.lang.Exception
Subclasses should provide the implementation

Parameters:
responseType - ResponseType that contains the encrypted assertion
Returns:
response type with the decrypted assertion
Throws:
java.lang.Exception


Copyright © 2009 JBoss Inc.. All Rights Reserved.