Java Doc for AuthenticatorBase.java in  » Sevlet-Container » apache-tomcat-6.0.14 » org » apache » catalina » authenticator » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » apache tomcat 6.0.14 » org.apache.catalina.authenticator 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.catalina.valves.ValveBase
      org.apache.catalina.authenticator.AuthenticatorBase

All known Subclasses:   org.apache.catalina.authenticator.DigestAuthenticator,  org.apache.catalina.authenticator.BasicAuthenticator,  org.apache.catalina.authenticator.NonLoginAuthenticator,  org.apache.catalina.authenticator.SSLAuthenticator,  org.apache.catalina.authenticator.FormAuthenticator,
AuthenticatorBase
abstract public class AuthenticatorBase extends ValveBase implements Authenticator,Lifecycle(Code)
Basic implementation of the Valve interface that enforces the <security-constraint> elements in the web application deployment descriptor. This functionality is implemented as a Valve so that it can be ommitted in environments that do not require these features. Individual implementations of each supported authentication method can subclass this base class as required.

USAGE CONSTRAINT: When this class is utilized, the Context to which it is attached (or a parent Container in a hierarchy) must have an associated Realm that can be used for authenticating users and enumerating the roles to which they have been assigned.

USAGE CONSTRAINT: This Valve is only useful when processing HTTP requests. Requests of any other type will simply be passed through.
author:
   Craig R. McClanahan
version:
   $Revision: 500626 $ $Date: 2007-01-27 22:25:41 +0100 (sam., 27 janv. 2007) $



Field Summary
final protected static  StringDEFAULT_ALGORITHM
     The default message digest algorithm to use if we cannot use the requested one.
final protected static  intSESSION_ID_BYTES
     The number of random bytes to include when generating a session identifier.
protected  Stringalgorithm
     The message digest algorithm to be used when generating session identifiers.
protected  booleancache
    
protected  Contextcontext
     The Context to which this Valve is attached.
protected  MessageDigestdigest
     Return the MessageDigest implementation to be used when creating session identifiers.
protected  booleandisableProxyCaching
     Flag to determine if we disable proxy caching, or leave the issue up to the webapp developer.
protected  Stringentropy
     A String initialization parameter used to increase the entropy of the initialization of our random number generator.
final protected static  Stringinfo
     Descriptive information about this implementation.
protected  LifecycleSupportlifecycle
     The lifecycle event support for this component.
protected  Randomrandom
     A random number generator to use when generating session identifiers.
protected  StringrandomClass
     The Java class name of the random number generator class to be used when generating session identifiers.
protected  booleansecurePagesWithPragma
    
final protected static  StringManagersm
     The string manager for this package.
protected  SingleSignOnsso
     The SingleSignOn implementation in our request processing chain, if there is one.
protected  booleanstarted
    


Method Summary
public  voidaddLifecycleListener(LifecycleListener listener)
     Add a lifecycle event listener to this component.
protected  voidassociate(String ssoId, Session session)
     Associate the specified single sign on identifier with the specified Session.
abstract protected  booleanauthenticate(Request request, Response response, LoginConfig config)
     Authenticate the user making this request, based on the specified login configuration.
public  LifecycleListener[]findLifecycleListeners()
     Get the lifecycle listeners associated with this lifecycle.
protected synchronized  StringgenerateSessionId()
     Generate and return a new session identifier for the cookie that identifies an SSO principal.
public  StringgetAlgorithm()
     Return the message digest algorithm for this Manager.
public  booleangetCache()
     Return the cache authenticated Principals flag.
public  ContainergetContainer()
     Return the Container to which this Valve is attached.
protected synchronized  MessageDigestgetDigest()
     Return the MessageDigest object to be used for calculating session identifiers.
public  booleangetDisableProxyCaching()
     Return the flag that states if we add headers to disable caching by proxies.
public  StringgetEntropy()
     Return the entropy increaser value, or compute a semi-useful value if this String has not yet been set.
public  StringgetInfo()
     Return descriptive information about this Valve implementation.
protected synchronized  RandomgetRandom()
     Return the random number generator instance we should use for generating session identifiers.
public  StringgetRandomClass()
     Return the random number generator class name.
public  booleangetSecurePagesWithPragma()
     Return the flag that states, if proxy caching is disabled, what headers we add to disable the caching.
public  voidinvoke(Request request, Response response)
     Enforce the security restrictions in the web application deployment descriptor of our associated Context.
protected  booleanreauthenticateFromSSO(String ssoId, Request request)
     Attempts reauthentication to the Realm using the credentials included in argument entry.
protected  voidregister(Request request, Response response, Principal principal, String authType, String username, String password)
     Register an authenticated Principal and authentication type in our request, in the current session (if there is one), and with our SingleSignOn valve, if there is one.
public  voidremoveLifecycleListener(LifecycleListener listener)
     Remove a lifecycle event listener from this component.
public  voidsetAlgorithm(String algorithm)
     Set the message digest algorithm for this Manager.
public  voidsetCache(boolean cache)
     Set the cache authenticated Principals flag.
public  voidsetContainer(Container container)
     Set the Container to which this Valve is attached.
public  voidsetDisableProxyCaching(boolean nocache)
     Set the value of the flag that states if we add headers to disable caching by proxies.
public  voidsetEntropy(String entropy)
     Set the entropy increaser value.
public  voidsetRandomClass(String randomClass)
     Set the random number generator class name.
public  voidsetSecurePagesWithPragma(boolean securePagesWithPragma)
     Set the value of the flag that states what headers we add to disable proxy caching.
public  voidstart()
     Prepare for the beginning of active use of the public methods of this component.
public  voidstop()
     Gracefully terminate the active use of the public methods of this component.

Field Detail
DEFAULT_ALGORITHM
final protected static String DEFAULT_ALGORITHM(Code)
The default message digest algorithm to use if we cannot use the requested one.



SESSION_ID_BYTES
final protected static int SESSION_ID_BYTES(Code)
The number of random bytes to include when generating a session identifier.



algorithm
protected String algorithm(Code)
The message digest algorithm to be used when generating session identifiers. This must be an algorithm supported by the java.security.MessageDigest class on your platform.



cache
protected boolean cache(Code)
Should we cache authenticated Principals if the request is part of an HTTP session?



context
protected Context context(Code)
The Context to which this Valve is attached.



digest
protected MessageDigest digest(Code)
Return the MessageDigest implementation to be used when creating session identifiers.



disableProxyCaching
protected boolean disableProxyCaching(Code)
Flag to determine if we disable proxy caching, or leave the issue up to the webapp developer.



entropy
protected String entropy(Code)
A String initialization parameter used to increase the entropy of the initialization of our random number generator.



info
final protected static String info(Code)
Descriptive information about this implementation.



lifecycle
protected LifecycleSupport lifecycle(Code)
The lifecycle event support for this component.



random
protected Random random(Code)
A random number generator to use when generating session identifiers.



randomClass
protected String randomClass(Code)
The Java class name of the random number generator class to be used when generating session identifiers.



securePagesWithPragma
protected boolean securePagesWithPragma(Code)
Flag to determine if we disable proxy caching with headers incompatible with IE



sm
final protected static StringManager sm(Code)
The string manager for this package.



sso
protected SingleSignOn sso(Code)
The SingleSignOn implementation in our request processing chain, if there is one.



started
protected boolean started(Code)
Has this component been started?





Method Detail
addLifecycleListener
public void addLifecycleListener(LifecycleListener listener)(Code)
Add a lifecycle event listener to this component.
Parameters:
  listener - The listener to add



associate
protected void associate(String ssoId, Session session)(Code)
Associate the specified single sign on identifier with the specified Session.
Parameters:
  ssoId - Single sign on identifier
Parameters:
  session - Session to be associated



authenticate
abstract protected boolean authenticate(Request request, Response response, LoginConfig config) throws IOException(Code)
Authenticate the user making this request, based on the specified login configuration. Return true if any specified constraint has been satisfied, or false if we have created a response challenge already.
Parameters:
  request - Request we are processing
Parameters:
  response - Response we are creating
Parameters:
  config - Login configuration describing how authenticationshould be performed
exception:
  IOException - if an input/output error occurs



findLifecycleListeners
public LifecycleListener[] findLifecycleListeners()(Code)
Get the lifecycle listeners associated with this lifecycle. If this Lifecycle has no listeners registered, a zero-length array is returned.



generateSessionId
protected synchronized String generateSessionId()(Code)
Generate and return a new session identifier for the cookie that identifies an SSO principal.



getAlgorithm
public String getAlgorithm()(Code)
Return the message digest algorithm for this Manager.



getCache
public boolean getCache()(Code)
Return the cache authenticated Principals flag.



getContainer
public Container getContainer()(Code)
Return the Container to which this Valve is attached.



getDigest
protected synchronized MessageDigest getDigest()(Code)
Return the MessageDigest object to be used for calculating session identifiers. If none has been created yet, initialize one the first time this method is called.



getDisableProxyCaching
public boolean getDisableProxyCaching()(Code)
Return the flag that states if we add headers to disable caching by proxies.



getEntropy
public String getEntropy()(Code)
Return the entropy increaser value, or compute a semi-useful value if this String has not yet been set.



getInfo
public String getInfo()(Code)
Return descriptive information about this Valve implementation.



getRandom
protected synchronized Random getRandom()(Code)
Return the random number generator instance we should use for generating session identifiers. If there is no such generator currently defined, construct and seed a new one.



getRandomClass
public String getRandomClass()(Code)
Return the random number generator class name.



getSecurePagesWithPragma
public boolean getSecurePagesWithPragma()(Code)
Return the flag that states, if proxy caching is disabled, what headers we add to disable the caching.



invoke
public void invoke(Request request, Response response) throws IOException, ServletException(Code)
Enforce the security restrictions in the web application deployment descriptor of our associated Context.
Parameters:
  request - Request to be processed
Parameters:
  response - Response to be processed
exception:
  IOException - if an input/output error occurs
exception:
  ServletException - if thrown by a processing element



reauthenticateFromSSO
protected boolean reauthenticateFromSSO(String ssoId, Request request)(Code)
Attempts reauthentication to the Realm using the credentials included in argument entry.
Parameters:
  ssoId - identifier of SingleSignOn session with which thecaller is associated
Parameters:
  request - the request that needs to be authenticated



register
protected void register(Request request, Response response, Principal principal, String authType, String username, String password)(Code)
Register an authenticated Principal and authentication type in our request, in the current session (if there is one), and with our SingleSignOn valve, if there is one. Set the appropriate cookie to be returned.
Parameters:
  request - The servlet request we are processing
Parameters:
  response - The servlet response we are generating
Parameters:
  principal - The authenticated Principal to be registered
Parameters:
  authType - The authentication type to be registered
Parameters:
  username - Username used to authenticate (if any)
Parameters:
  password - Password used to authenticate (if any)



removeLifecycleListener
public void removeLifecycleListener(LifecycleListener listener)(Code)
Remove a lifecycle event listener from this component.
Parameters:
  listener - The listener to remove



setAlgorithm
public void setAlgorithm(String algorithm)(Code)
Set the message digest algorithm for this Manager.
Parameters:
  algorithm - The new message digest algorithm



setCache
public void setCache(boolean cache)(Code)
Set the cache authenticated Principals flag.
Parameters:
  cache - The new cache flag



setContainer
public void setContainer(Container container)(Code)
Set the Container to which this Valve is attached.
Parameters:
  container - The container to which we are attached



setDisableProxyCaching
public void setDisableProxyCaching(boolean nocache)(Code)
Set the value of the flag that states if we add headers to disable caching by proxies.
Parameters:
  nocache - true if we add headers to disable proxy caching, false if we leave the headers alone.



setEntropy
public void setEntropy(String entropy)(Code)
Set the entropy increaser value.
Parameters:
  entropy - The new entropy increaser value



setRandomClass
public void setRandomClass(String randomClass)(Code)
Set the random number generator class name.
Parameters:
  randomClass - The new random number generator class name



setSecurePagesWithPragma
public void setSecurePagesWithPragma(boolean securePagesWithPragma)(Code)
Set the value of the flag that states what headers we add to disable proxy caching.
Parameters:
  securePagesWithPragma - true if we add headers which are incompatible with downloading office documents in IE under SSL butwhich fix a caching problem in Mozilla.



start
public void start() throws LifecycleException(Code)
Prepare for the beginning of active use of the public methods of this component. This method should be called after configure(), and before any of the public methods of the component are utilized.
exception:
  LifecycleException - if this component detects a fatal errorthat prevents this component from being used



stop
public void stop() throws LifecycleException(Code)
Gracefully terminate the active use of the public methods of this component. This method should be the last one called on a given instance of this component.
exception:
  LifecycleException - if this component detects a fatal errorthat needs to be reported



Fields inherited from org.apache.catalina.valves.ValveBase
protected Container container(Code)(Java Doc)
protected Log containerLog(Code)(Java Doc)
protected ObjectName controller(Code)(Java Doc)
protected String domain(Code)(Java Doc)
protected static String info(Code)(Java Doc)
protected MBeanServer mserver(Code)(Java Doc)
protected Valve next(Code)(Java Doc)
protected ObjectName oname(Code)(Java Doc)
final protected static StringManager sm(Code)(Java Doc)

Methods inherited from org.apache.catalina.valves.ValveBase
public void backgroundProcess()(Code)(Java Doc)
public ObjectName createObjectName(String domain, ObjectName parent) throws MalformedObjectNameException(Code)(Java Doc)
public void event(Request request, Response response, CometEvent event) throws IOException, ServletException(Code)(Java Doc)
public Container getContainer()(Code)(Java Doc)
public ObjectName getContainerName()(Code)(Java Doc)
public ObjectName getController()(Code)(Java Doc)
public String getDomain()(Code)(Java Doc)
public String getInfo()(Code)(Java Doc)
public Valve getNext()(Code)(Java Doc)
public ObjectName getObjectName()(Code)(Java Doc)
public ObjectName getParentName(ObjectName valveName)(Code)(Java Doc)
abstract public void invoke(Request request, Response response) throws IOException, ServletException(Code)(Java Doc)
public void postDeregister()(Code)(Java Doc)
public void postRegister(Boolean registrationDone)(Code)(Java Doc)
public void preDeregister() throws Exception(Code)(Java Doc)
public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception(Code)(Java Doc)
public void setContainer(Container container)(Code)(Java Doc)
public void setController(ObjectName controller)(Code)(Java Doc)
public void setNext(Valve valve)(Code)(Java Doc)
public void setObjectName(ObjectName oname)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.