Java Doc for AuthenticationManager.java in  » Wiki-Engine » JSPWiki » com » ecyrd » jspwiki » auth » 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 » Wiki Engine » JSPWiki » com.ecyrd.jspwiki.auth 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ecyrd.jspwiki.auth.AuthenticationManager

AuthenticationManager
final public class AuthenticationManager (Code)
Manages authentication activities for a WikiEngine: user login, logout, and credential refreshes. This class uses JAAS to determine how users log in.
author:
   Andrew Jaquith
author:
   Janne Jalkanen
author:
   Erik Bunn
since:
   2.3


Field Summary
final public static  StringCOOKIE_AUTHENTICATION_MODULE
    
final public static  StringCOOKIE_MODULE
    
final public static  StringLOGIN_CONTAINER
     The JAAS application name for the web container authentication stack.
final public static  StringLOGIN_CUSTOM
     The JAAS application name for the JSPWiki custom authentication stack.
final public static  StringPROP_SECURITY
     This property determines whether we use JSPWiki authentication or not.
final public static  StringPROP_STOREIPADDRESS
     If this jspwiki.properties property is true, logs the IP address of the editor on saving.
final protected static  StringSECURITY_CONTAINER
     Just to provide compatibility with the old versions.
final public static  StringSECURITY_JAAS
    
final public static  StringSECURITY_OFF
     Value specifying that the user wants to use the container-managed security, just like in JSPWiki 2.2.
final protected static  Loggerlog
    
protected  booleanm_isJaasConfiguredAtStartup
    


Method Summary
final public synchronized  voidaddWikiEventListener(WikiEventListener listener)
     Registers a WikiEventListener with this instance.
final public static  booleanallowsCookieAssertions()
     Determines whether this WikiEngine allows users to assert identities using cookies instead of passwords.
final public static  booleanallowsCookieAuthentication()
     Determines whether this WikiEngine allows users to authenticate using cookies instead of passwords.
final protected static  URLfindConfigFile(WikiEngine engine, String name)
     Looks up and obtains a configuration file inside the WEB-INF folder of a wiki webapp.
final protected  voidfireEvent(int type, Principal principal, Object target)
     Fires a WikiSecurityEvent of the provided type, Principal and target Object to all registered listeners.
final public  voidinitialize(WikiEngine engine, Properties props)
     Creates an AuthenticationManager instance for the given WikiEngine and the specified set of properties.
final public  booleanisContainerAuthenticated()
     Returns true if this WikiEngine uses container-managed authentication. This method is used primarily for cosmetic purposes in the JSP tier, and performs no meaningful security function per se.
final public static  booleanisRolePrincipal(Principal principal)
     Determines whether the supplied Principal is a "role principal".
final public static  booleanisUserPrincipal(Principal principal)
     Determines whether the supplied Principal is a "user principal".
final public  booleanlogin(HttpServletRequest request)
    

Logs in the user by attempting to populate a WikiSession Subject from a web servlet request.

final public  booleanlogin(WikiSession session, String username, String password)
     Attempts to perform a WikiSession login for the given username/password combination.
final public  voidlogout(HttpServletRequest request)
     Logs the user out by retrieving the WikiSession associated with the HttpServletRequest and unbinding all of the Subject's Principals, except for Role.ALL , Role.ANONYMOUS .
final public synchronized  voidremoveWikiEventListener(WikiEventListener listener)
     Un-registers a WikiEventListener with this instance.

Field Detail
COOKIE_AUTHENTICATION_MODULE
final public static String COOKIE_AUTHENTICATION_MODULE(Code)
The name of the built-in cookie authentication module



COOKIE_MODULE
final public static String COOKIE_MODULE(Code)
The name of the built-in cookie assertion module



LOGIN_CONTAINER
final public static String LOGIN_CONTAINER(Code)
The JAAS application name for the web container authentication stack.



LOGIN_CUSTOM
final public static String LOGIN_CUSTOM(Code)
The JAAS application name for the JSPWiki custom authentication stack.



PROP_SECURITY
final public static String PROP_SECURITY(Code)
This property determines whether we use JSPWiki authentication or not. Possible values are AUTH_JAAS or AUTH_CONTAINER.



PROP_STOREIPADDRESS
final public static String PROP_STOREIPADDRESS(Code)
If this jspwiki.properties property is true, logs the IP address of the editor on saving.



SECURITY_CONTAINER
final protected static String SECURITY_CONTAINER(Code)
Just to provide compatibility with the old versions. The same as SECURITY_OFF.



SECURITY_JAAS
final public static String SECURITY_JAAS(Code)
Value specifying that the user wants to use the built-in JAAS-based system



SECURITY_OFF
final public static String SECURITY_OFF(Code)
Value specifying that the user wants to use the container-managed security, just like in JSPWiki 2.2.



log
final protected static Logger log(Code)



m_isJaasConfiguredAtStartup
protected boolean m_isJaasConfiguredAtStartup(Code)
Was JAAS login config already set before we startd up?





Method Detail
addWikiEventListener
final public synchronized void addWikiEventListener(WikiEventListener listener)(Code)
Registers a WikiEventListener with this instance. This is a convenience method.
Parameters:
  listener - the event listener



allowsCookieAssertions
final public static boolean allowsCookieAssertions()(Code)
Determines whether this WikiEngine allows users to assert identities using cookies instead of passwords. This is determined by inspecting the LoginConfiguration for application JSPWiki-container. true if cookies are allowed



allowsCookieAuthentication
final public static boolean allowsCookieAuthentication()(Code)
Determines whether this WikiEngine allows users to authenticate using cookies instead of passwords. This is determined by inspecting the LoginConfiguration for application JSPWiki-container. true if cookies are allowed for authentication
since:
   2.5.62



findConfigFile
final protected static URL findConfigFile(WikiEngine engine, String name)(Code)
Looks up and obtains a configuration file inside the WEB-INF folder of a wiki webapp.
Parameters:
  engine - the wiki engine
Parameters:
  name - the file to obtain, e.g., jspwiki.policy the URL to the file



fireEvent
final protected void fireEvent(int type, Principal principal, Object target)(Code)
Fires a WikiSecurityEvent of the provided type, Principal and target Object to all registered listeners.
See Also:   com.ecyrd.jspwiki.event.WikiSecurityEvent
Parameters:
  type - the event type to be fired
Parameters:
  principal - the subject of the event, which may be null
Parameters:
  target - the changed Object, which may be null



initialize
final public void initialize(WikiEngine engine, Properties props) throws WikiException(Code)
Creates an AuthenticationManager instance for the given WikiEngine and the specified set of properties. All initialization for the modules is done here.
Parameters:
  engine - the wiki engine
Parameters:
  props - the properties used to initialize the wiki engine
throws:
  WikiException - if the AuthenticationManager cannot be initialized



isContainerAuthenticated
final public boolean isContainerAuthenticated()(Code)
Returns true if this WikiEngine uses container-managed authentication. This method is used primarily for cosmetic purposes in the JSP tier, and performs no meaningful security function per se. Delegates to com.ecyrd.jspwiki.auth.authorize.WebContainerAuthorizer.isContainerAuthorized , if used as the external authorizer; otherwise, returns false. true if the wiki's authentication is managed bythe container, false otherwise



isRolePrincipal
final public static boolean isRolePrincipal(Principal principal)(Code)
Determines whether the supplied Principal is a "role principal".
Parameters:
  principal - the principal to test true if the Principal is of typeGroupPrincipal orcom.ecyrd.jspwiki.auth.authorize.Role,false otherwise



isUserPrincipal
final public static boolean isUserPrincipal(Principal principal)(Code)
Determines whether the supplied Principal is a "user principal".
Parameters:
  principal - the principal to test false if the Principal is of typeGroupPrincipal orcom.ecyrd.jspwiki.auth.authorize.Role,true otherwise



login
final public boolean login(HttpServletRequest request) throws WikiSecurityException(Code)

Logs in the user by attempting to populate a WikiSession Subject from a web servlet request. This method leverages container-managed authentication. This method logs in the user if the user's status is "unknown" to the WikiSession, or if the Http servlet container's authentication status has changed. This method assumes that the HttpServletRequest is not null; otherwise, an IllegalStateException is thrown. This method is a privileged action; the caller must posess the (name here) permission.

If request is null, or the WikiSession cannot be located for this request, this method throws an IllegalStateException .

methods return null
Parameters:
  request - servlet request for this user the result of the login operation: true if the user logged insuccessfully; false otherwise
throws:
  com.ecyrd.jspwiki.auth.WikiSecurityException - if the Authorizer or UserManager cannot be obtained
since:
   2.3



login
final public boolean login(WikiSession session, String username, String password) throws WikiSecurityException(Code)
Attempts to perform a WikiSession login for the given username/password combination. This is custom authentication.
Parameters:
  session - the current wiki session; may not be null.
Parameters:
  username - The user name. This is a login name, not a WikiName. Inmost cases they are the same, but in some cases, they mightnot be.
Parameters:
  password - The password true, if the username/password is valid
throws:
  com.ecyrd.jspwiki.auth.WikiSecurityException - if the Authorizer or UserManager cannot be obtained



logout
final public void logout(HttpServletRequest request)(Code)
Logs the user out by retrieving the WikiSession associated with the HttpServletRequest and unbinding all of the Subject's Principals, except for Role.ALL , Role.ANONYMOUS . is a cheap-and-cheerful way to do it without invoking JAAS LoginModules. The logout operation will also flush the JSESSIONID cookie from the user's browser session, if it was set.
Parameters:
  request - the current HTTP request



removeWikiEventListener
final public synchronized void removeWikiEventListener(WikiEventListener listener)(Code)
Un-registers a WikiEventListener with this instance. This is a convenience method.
Parameters:
  listener - the event listener



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.