Java Doc for Authenticated.java in  » Web-Framework » rife-1.6.1 » com » uwyn » rife » authentication » elements » 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 » Web Framework » rife 1.6.1 » com.uwyn.rife.authentication.elements 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.uwyn.rife.authentication.elements.Identified
   com.uwyn.rife.authentication.elements.Authenticated

All known Subclasses:   com.uwyn.rife.authentication.elements.RoleUserAuthenticated,
Authenticated
abstract public class Authenticated extends Identified implements SessionAttributes(Code)
Requires that the user have a valid authentication session before access to a child element is allowed. This class contains the logic for restoring remembered sessions and displaying a template (typically a login form) if the user is not authenticated.

The following properties may be set:

enforce_authenticated (default = true)
Controls whether access to child elements is allowed for users who don't have valid authentication sessions. If this property is false, a user with no authentication session is allowed to access the child element, but there is no user identity information available.

The child element implementation may distinguish an anonymous user from an authenticated one by calling Authenticated.getRequestAttribute(String) getRequestAttribute(Identified.IDENTITY_ATTRIBUTE_NAME) }.

This is similar to using an Identified } element, but expired sessions will automatically be recreated if the user has the appropriate "remember me" cookie set and "remember me" is enabled.

To customize the behavior of the authentication, it's the easiest to override one of the hook methods.
author:
   Steven Grimm (koreth[remove] at midwinter dot com)
author:
   Geert Bevin (gbevin[remove] at uwyn dot com)
version:
   $Revision: 3654 $
since:
   1.6



Field Summary
protected  StringmTemplateName
    

Constructor Summary
protected  Authenticated()
    

Method Summary
protected  voidacceptedCredentials(Credentials credentials)
     Hook method that is called when valid credentials have been accepted by the CredentialsManager that backs this authentication element.
protected  voidauthenticated(long userId)
     Hook method that is called after a new authentication session has been successfully created.
public  booleanchildTriggered(String name, String[] values)
    
public static  StringcreateAuthenticationRequestAttributeName(ElementInfo elementInfo, String name, String value)
     Creates a name for the current authentication context that can be used to cache the authentication process' result as a request attribute.
protected  voidentrance(Template template)
     Hook method that is called after the template instance has been instantiated.
public  ElementInfogetAuthElement()
     Returns the ElementInfo of this authentication element.
public  StringgetAuthenticatedElementId()
     Returns the ID of this authentication element.
public  Class<? extends Credentials>getCredentialsClass()
     Returns the class that is used for handling the credentials.
public  SessionValidatorgetSessionValidator()
     Returns the class that is used for handling the credentials.
protected  voidinitializeAuthentication()
     Hook method that is called at the start of the element's execution.
public  voidprocessElement()
    
protected  voidrefusedCredentials(Template template, Credentials credentials)
     Hook method that is called when valid credentials have been rejected by the CredentialsManager that backs this authentication element.

This can for example happen when the password is not correct.

Note that there is already a default implementation of this hook method that simply adds a validation error to the credentials object.

protected  voidsessionCreationError(Template template, Credentials credentials)
     Hook method that is called when the SessionManager couldn't create a new authentication session of valid and accepted credentials.

Note that there is already a default implementation of this hook method that simply adds a validation error to the credentials object.

protected  voidsessionNotValid(String childTriggerName, String[] childTriggerValues, int validityId)
     Hook method that is called when the SessionValidator doesn't accept the authentication ID that a user provides after having been logged in.
protected  voidsetTemplateName(String name)
     Allows a custom template name to be set.
protected  voidunvalidatedCredentials(Template template, Credentials credentials)
     Hook method that is called on login form submission when validation of the credentials produces validation errors.
protected  voidvalidatedCredentials(Credentials credentials)
    

Field Detail
mTemplateName
protected String mTemplateName(Code)




Constructor Detail
Authenticated
protected Authenticated()(Code)




Method Detail
acceptedCredentials
protected void acceptedCredentials(Credentials credentials)(Code)
Hook method that is called when valid credentials have been accepted by the CredentialsManager that backs this authentication element.
Parameters:
  credentials - the credentials object that was accepted
since:
   1.0



authenticated
protected void authenticated(long userId)(Code)
Hook method that is called after a new authentication session has been successfully created.
Parameters:
  userId - the user ID of the user that was successfully authenticated
since:
   1.0



childTriggered
public boolean childTriggered(String name, String[] values)(Code)



createAuthenticationRequestAttributeName
public static String createAuthenticationRequestAttributeName(ElementInfo elementInfo, String name, String value) throws EngineException(Code)
Creates a name for the current authentication context that can be used to cache the authentication process' result as a request attribute. This name is built from the authentication element's ID, the name of the authentication var and its value.
Parameters:
  elementInfo - the authentication element information
Parameters:
  name - the name of the authentication variable
Parameters:
  value - the value of the authentication variable the created name
since:
   1.5



entrance
protected void entrance(Template template)(Code)
Hook method that is called after the template instance has been instantiated.
Parameters:
  template - the template instance that has been instantiated
since:
   1.0



getAuthElement
public ElementInfo getAuthElement()(Code)
Returns the ElementInfo of this authentication element. this authentication element's ElementInfo
since:
   1.0



getAuthenticatedElementId
public String getAuthenticatedElementId()(Code)
Returns the ID of this authentication element. this authentication element's ID
since:
   1.0



getCredentialsClass
public Class<? extends Credentials> getCredentialsClass()(Code)
Returns the class that is used for handling the credentials. this credentials' class
since:
   1.0



getSessionValidator
public SessionValidator getSessionValidator()(Code)
Returns the class that is used for handling the credentials. the credentials' class
since:
   1.0



initializeAuthentication
protected void initializeAuthentication()(Code)
Hook method that is called at the start of the element's execution.
since:
   1.0



processElement
public void processElement()(Code)



refusedCredentials
protected void refusedCredentials(Template template, Credentials credentials)(Code)
Hook method that is called when valid credentials have been rejected by the CredentialsManager that backs this authentication element.

This can for example happen when the password is not correct.

Note that there is already a default implementation of this hook method that simply adds a validation error to the credentials object. If you want to preserve this when you implement your own hook method, you need to call the super class's method in your implementation.
Parameters:
  template - this authentication element's template
Parameters:
  credentials - the credentials object that was rejected
since:
   1.0




sessionCreationError
protected void sessionCreationError(Template template, Credentials credentials)(Code)
Hook method that is called when the SessionManager couldn't create a new authentication session of valid and accepted credentials.

Note that there is already a default implementation of this hook method that simply adds a validation error to the credentials object. If you want to preserve this when you implement your own hook method, you need to call the super class's method in your implementation.
Parameters:
  template - this authentication element's template
Parameters:
  credentials - the credentials object that was used when creating theauthentication session
since:
   1.0




sessionNotValid
protected void sessionNotValid(String childTriggerName, String[] childTriggerValues, int validityId)(Code)
Hook method that is called when the SessionValidator doesn't accept the authentication ID that a user provides after having been logged in.

This can happen for example happen when the maximum duration has expired, when the authentication ID has been tampered with, or when the authentication ID isn't known anymore by the backing store.
Parameters:
  childTriggerName - the name of the child trigger that containsthe authentication ID
Parameters:
  childTriggerValues - the values of the child trigger with theauthentication ID
Parameters:
  validityId - a number that indicates the validation state of thesession, as used by the SessionValidator, more information canbe found here: SessionValidator.validateSession
since:
   1.0




setTemplateName
protected void setTemplateName(String name)(Code)
Allows a custom template name to be set.

This method is typically called during the implementation of method hooks to change the template that will be used by this authentication element.
Parameters:
  name - the name of the template
since:
   1.0




unvalidatedCredentials
protected void unvalidatedCredentials(Template template, Credentials credentials)(Code)
Hook method that is called on login form submission when validation of the credentials produces validation errors.
Parameters:
  template - this authentication element's template
Parameters:
  credentials - the credentials object that was invalid
since:
   1.0



validatedCredentials
protected void validatedCredentials(Credentials credentials)(Code)
Hook method that is called on login form submission when the credentials are validated without errors
Parameters:
  credentials - the credentials object that was valid
since:
   1.0



Fields inherited from com.uwyn.rife.authentication.elements.Identified
final public static String IDENTITY_ATTRIBUTE_NAME(Code)(Java Doc)

Methods inherited from com.uwyn.rife.authentication.elements.Identified
public boolean childTriggered(String name, String[] values)(Code)(Java Doc)
public ElementInfo getAuthElement()(Code)(Java Doc)
public String getAuthElementId()(Code)(Java Doc)
public RoleUserIdentity getIdentity(String name, String[] values)(Code)(Java Doc)
public void processElement()(Code)(Java Doc)
public void setIdentityAttribute(String name, String[] values)(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.