org.apache.catalina.authenticator
Class SingleSignOn

java.lang.Object
  |
  +--org.apache.catalina.valves.ValveBase
        |
        +--org.apache.catalina.authenticator.SingleSignOn
All Implemented Interfaces:
Valve

public class SingleSignOn
extends ValveBase

A Valve that supports a "single sign on" user experience, where the security identity of a user who successfully authenticates to one web application is propogated to other web applications in the same security domain. For successful use, the following requirements must be met:

Version:
$Revision: 1.2 $ $Date: 2000/10/18 18:15:51 $
Author:
Craig R. McClanahan

Field Summary
protected  java.util.HashMap cache
          The cache of SingleSignOnEntry instances for authenticated Principals, keyed by the cookie value that is used to select them.
protected  int debug
          The debugging detail level for this component.
protected static java.lang.String info
          Descriptive information about this Valve implementation.
protected static StringManager sm
          The string manager for this package.
 
Fields inherited from class org.apache.catalina.valves.ValveBase
container, next, previous
 
Constructor Summary
SingleSignOn()
           
 
Method Summary
 void deregister(java.lang.String cookie)
          Deregister the specified cookie value for the single sign on cookie.
 java.lang.String getInfo()
          Return descriptive information about this Valve implementation.
 void invoke(Request request, Response response)
          Perform single-sign-on support processing for this request.
protected  void log(java.lang.String message)
          Log a message on the Logger associated with our Container (if any).
protected  void log(java.lang.String message, java.lang.Throwable throwable)
          Log a message on the Logger associated with our Container (if any).
protected  org.apache.catalina.authenticator.SingleSignOnEntry lookup(java.lang.String cookie)
          Look up and return the cached Principal associated with this cookie value, if there is one; otherwise return null.
 void register(java.lang.String cookie, java.security.Principal principal, java.lang.String authType)
          Register the specified Principal as being associated with the specified value for the single sign on cookie.
 java.lang.String toString()
          Return a String rendering of this object.
 
Methods inherited from class org.apache.catalina.valves.ValveBase
getContainer, getNext, getPrevious, invokeNext, setContainer, setNext, setPrevious
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cache

protected java.util.HashMap cache
The cache of SingleSignOnEntry instances for authenticated Principals, keyed by the cookie value that is used to select them.

debug

protected int debug
The debugging detail level for this component.

info

protected static java.lang.String info
Descriptive information about this Valve implementation.

sm

protected static final StringManager sm
The string manager for this package.
Constructor Detail

SingleSignOn

public SingleSignOn()
Method Detail

getInfo

public java.lang.String getInfo()
Return descriptive information about this Valve implementation.
Overrides:
getInfo in class ValveBase

invoke

public void invoke(Request request,
                   Response response)
            throws java.io.IOException,
                   javax.servlet.ServletException
Perform single-sign-on support processing for this request.
Overrides:
invoke in class ValveBase
Parameters:
request - The servlet request we are processing
response - The servlet response we are creating
Throws:
java.io.IOException - if an input/output error occurs
javax.servlet.ServletException - if a servlet error occurs

deregister

public void deregister(java.lang.String cookie)
Deregister the specified cookie value for the single sign on cookie.
Parameters:
cookie - Cookie value for the single sign on cookie to deregister

register

public void register(java.lang.String cookie,
                     java.security.Principal principal,
                     java.lang.String authType)
Register the specified Principal as being associated with the specified value for the single sign on cookie.
Parameters:
cookie - Cookie value for the single sign on cookie
principal - Associated user principal that is identified
authType - Authentication type used to authenticate this user principal

toString

public java.lang.String toString()
Return a String rendering of this object.
Overrides:
toString in class java.lang.Object

log

protected void log(java.lang.String message)
Log a message on the Logger associated with our Container (if any).
Parameters:
message - Message to be logged

log

protected void log(java.lang.String message,
                   java.lang.Throwable throwable)
Log a message on the Logger associated with our Container (if any).
Parameters:
message - Message to be logged
throwable - Associated exception

lookup

protected org.apache.catalina.authenticator.SingleSignOnEntry lookup(java.lang.String cookie)
Look up and return the cached Principal associated with this cookie value, if there is one; otherwise return null.
Parameters:
cookie - Cookie value to look up


Copyright © 2000 Apache Software Foundation. All Rights Reserved.