Java Doc for OnlineUserFactory.java in  » Forum » mvnforum-1.1 » com » mvnforum » 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 » Forum » mvnforum 1.1 » com.mvnforum.auth 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.mvnforum.auth.OnlineUserFactory

All known Subclasses:   com.mvnforum.auth.OnlineUserFactoryImpl,
OnlineUserFactory
public interface OnlineUserFactory (Code)




Method Summary
public  voidensureCorrectPassword(String loginName, String password, boolean isEncodedPassword)
     Ensure the login/password pair is correct. If password is correct, nothing happen.
public  OnlineUsergetAnonymousUser(HttpServletRequest request)
     Get the anonymous user of the system.
public  OnlineUsergetAnonymousUser(GenericRequest request)
    
public  OnlineUsergetAuthenticatedUser(HttpServletRequest request, HttpServletResponse response, String loginName, String password, boolean isEncodedPassword)
     Authenticate the user given its login and password (maybe in encrypted form) and returns some basic information about it. Optionally, some information can be stored in the request or session to track that the user has been logged.
Parameters:
  request - useful to retrieve additional information toauthenticate the user.
Parameters:
  response - a HttpServletResponse value
Parameters:
  loginName - a String value
Parameters:
  password - a String value
Parameters:
  isEncodedPassword - indicate if the password to validate isalready encoded.
public  OnlineUsergetAuthenticatedUser(GenericRequest request, GenericResponse response, String loginName, String password, boolean isEncodedPassword)
    
public  StringgetEncodedPassword(String loginName, String password)
     Get an encoded version of the user password.
public  voidlogout(HttpServletRequest request, HttpServletResponse response)
     Logout the user from the system.
public  voidlogout(GenericRequest request, GenericResponse response)
     Logout the user from the system.
public  voidpostLogin(HttpServletRequest request, HttpServletResponse response, OnlineUser onlineUser)
     This method is called after user have logined successfully.
public  booleanvalidatePassword(String loginName, String password, boolean isEncodedPassword)
     Validate if the given login password pair is valid, in that case true will be returned.



Method Detail
ensureCorrectPassword
public void ensureCorrectPassword(String loginName, String password, boolean isEncodedPassword) throws AuthenticationException(Code)
Ensure the login/password pair is correct. If password is correct, nothing happen. However, if the password is not correct, an AuthenticationException will be thrown
Parameters:
  loginName - a String value
Parameters:
  password - a String value
Parameters:
  isEncodedPassword - indicate if the password to validate isalready encoded. Note that some backends may not support tovalidate against an encrypted password.
exception:
  AuthenticationException - if an error occurs



getAnonymousUser
public OnlineUser getAnonymousUser(HttpServletRequest request) throws DatabaseException(Code)
Get the anonymous user of the system. The request is used to check some parameters about the user, as its language.
Parameters:
  request - a HttpServletRequest value an OnlineUser value
exception:
  DatabaseException - if an error occurs



getAnonymousUser
public OnlineUser getAnonymousUser(GenericRequest request) throws DatabaseException(Code)



getAuthenticatedUser
public OnlineUser getAuthenticatedUser(HttpServletRequest request, HttpServletResponse response, String loginName, String password, boolean isEncodedPassword) throws AuthenticationException, DatabaseException(Code)
Authenticate the user given its login and password (maybe in encrypted form) and returns some basic information about it. Optionally, some information can be stored in the request or session to track that the user has been logged.
Parameters:
  request - useful to retrieve additional information toauthenticate the user.
Parameters:
  response - a HttpServletResponse value
Parameters:
  loginName - a String value
Parameters:
  password - a String value
Parameters:
  isEncodedPassword - indicate if the password to validate isalready encoded. Note that some backends may not support tovalidate against an encrypted password. an OnlineUser value
exception:
  AuthenticationException - if the pair login, passwordis not valid. Note that this method will call theOnlineUserFactory.validatePassword(String,String,boolean)
exception:
  DatabaseException - if an error occurs
See Also:   OnlineUserFactory.validatePassword(String,String,boolean)



getAuthenticatedUser
public OnlineUser getAuthenticatedUser(GenericRequest request, GenericResponse response, String loginName, String password, boolean isEncodedPassword) throws AuthenticationException, DatabaseException(Code)



getEncodedPassword
public String getEncodedPassword(String loginName, String password)(Code)
Get an encoded version of the user password. This can be useful to store that password in a cookie, for example. Note that not all backends will return encrypted passwords as this can be considered an insecure practice.
Parameters:
  loginName - a String value
Parameters:
  password - a String value the encoded password of the user or nullif the backend does not support returning stored passwords.



logout
public void logout(HttpServletRequest request, HttpServletResponse response)(Code)
Logout the user from the system.
Parameters:
  request - a HttpServletRequest value
Parameters:
  response - a HttpServletResponse value



logout
public void logout(GenericRequest request, GenericResponse response)(Code)
Logout the user from the system.
Parameters:
  request - a GenericRequest value
Parameters:
  response - a GenericResponse value



postLogin
public void postLogin(HttpServletRequest request, HttpServletResponse response, OnlineUser onlineUser) throws DatabaseException(Code)
This method is called after user have logined successfully. This method could be used to implement functions prepared for that user.
Parameters:
  request - a HttpServletRequest value
Parameters:
  response - a HttpServletResponse value
Parameters:
  onlineUser - a OnlineUser that have justed been authenticated



validatePassword
public boolean validatePassword(String loginName, String password, boolean isEncodedPassword) throws AuthenticationException(Code)
Validate if the given login password pair is valid, in that case true will be returned. If the password is not correct, false will be returned. If the user does not exist or in case of any error, an exception will be thrown.
Parameters:
  loginName - a String value
Parameters:
  password - a String value
Parameters:
  isEncodedPassword - indicate if the password to validate isalready encoded. Note that some backends may not support tovalidate against an encrypted password. a boolean value
exception:
  AuthenticationException - if an error occurs



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