Java Doc for AuthenticationData.java in  » Database-ORM » MMBase » org » mmbase » security » 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 » Database ORM » MMBase » org.mmbase.security 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.mmbase.security.AuthenticationData

All known Subclasses:   org.mmbase.security.Authentication,
AuthenticationData
public interface AuthenticationData (Code)
This interface represents information about the authentication implemtentation.
author:
   Michiel Meeuwissen
version:
   $Id: AuthenticationData.java,v 1.9 2007/06/18 09:01:14 michiel Exp $
since:
   MMBase-1.8


Field Summary
final static  intMETHOD_ANONYMOUS
     Requests an 'anonymous' cloud, with a user with no credentials.
final static  intMETHOD_ASIS
     Use the authenticated user which is stored in the session, or if no such user can be found, try to supply 'anonymous'.
final static  intMETHOD_DEFAULT
    
final static  intMETHOD_DELEGATE
     Delegates authentication completely to the authentication implementation.
final static  intMETHOD_HTTP
     Use Http 'Basic' authentication.
final static  intMETHOD_LOGINPAGE
     Use a dedicated 'login' jsp, to log in.
final static  intMETHOD_LOGOUT
     Remove the authenticated user from the session, and otherwise invalidate the user if necessary (e.g.
final static  intMETHOD_PAGELOGON
     Logon with given credentials (only Strings), and don't store this any where (except for the current 'page').
final static  intMETHOD_SESSIONDELEGATE
     Delegates authentication comletely to the authentication implementation AuthenticationData.METHOD_DELEGATE , but stores the authenticated in the session then.
final static  intMETHOD_SESSIONLOGON
     Logon with given credentials (only Strings), and don't store this in the session.
final static  intMETHOD_UNSET
    
final static  ParameterPARAMETER_AUTHENTICATE
    
final static  ParameterPARAMETER_LOGOUT
    
final static  Parameter<String>PARAMETER_PASSWORD
    
final static  ParameterPARAMETER_RANK
    
final static  ParameterPARAMETER_SESSIONNAME
    
final static  Parameter<String>PARAMETER_USERNAME
     Common parameters for logon-info.
final static  ParameterPARAMETER_USERNAMES
    
final static  StringSTRINGS
     Resourcebundle containing all kind of i18n versions of parameter names and so on.


Method Summary
 ParameterscreateParameters(String application)
     For a given authentication type returns a parameters object to fill with credentials.
 intgetDefaultMethod(String protocol)
     The security implementation can override a default method.
 intgetMethod(String m)
    

Several 'methods' to authenticate could be available.

 NodegetNode(UserContext userContext)
    
 String[]getTypes()
    

Gives all availabe authentication types.

 String[]getTypes(int method)
    

For a given method, returns the available 'applications'.

 StringgetUserBuilder()
     This method returns the builder name of the nodes that will be returned by the AuthenticationData.getNode() call.
 booleanisValid(UserContext userContext)
    

Field Detail
METHOD_ANONYMOUS
final static int METHOD_ANONYMOUS(Code)
Requests an 'anonymous' cloud, with a user with no credentials. This can only be used if the security implementation provides the 'anonymous' authentication application.



METHOD_ASIS
final static int METHOD_ASIS(Code)
Use the authenticated user which is stored in the session, or if no such user can be found, try to supply 'anonymous'.



METHOD_DEFAULT
final static int METHOD_DEFAULT(Code)



METHOD_DELEGATE
final static int METHOD_DELEGATE(Code)
Delegates authentication completely to the authentication implementation. When using http, request and response objects are added to the credentials (if the Parameters object returned by AuthenticationData.createParameters can accept that) which can be used for user-interaction.



METHOD_HTTP
final static int METHOD_HTTP(Code)
Use Http 'Basic' authentication. This only provides username / password and is not very safe, because http basic authentication sends those unencrypted.



METHOD_LOGINPAGE
final static int METHOD_LOGINPAGE(Code)
Use a dedicated 'login' jsp, to log in.



METHOD_LOGOUT
final static int METHOD_LOGOUT(Code)
Remove the authenticated user from the session, and otherwise invalidate the user if necessary (e.g. notify an authentication service).



METHOD_PAGELOGON
final static int METHOD_PAGELOGON(Code)
Logon with given credentials (only Strings), and don't store this any where (except for the current 'page').



METHOD_SESSIONDELEGATE
final static int METHOD_SESSIONDELEGATE(Code)
Delegates authentication comletely to the authentication implementation AuthenticationData.METHOD_DELEGATE , but stores the authenticated in the session then. A second request with this method will simply use the session.



METHOD_SESSIONLOGON
final static int METHOD_SESSIONLOGON(Code)
Logon with given credentials (only Strings), and don't store this in the session.



METHOD_UNSET
final static int METHOD_UNSET(Code)



PARAMETER_AUTHENTICATE
final static Parameter PARAMETER_AUTHENTICATE(Code)



PARAMETER_LOGOUT
final static Parameter PARAMETER_LOGOUT(Code)



PARAMETER_PASSWORD
final static Parameter<String> PARAMETER_PASSWORD(Code)



PARAMETER_RANK
final static Parameter PARAMETER_RANK(Code)



PARAMETER_SESSIONNAME
final static Parameter PARAMETER_SESSIONNAME(Code)



PARAMETER_USERNAME
final static Parameter<String> PARAMETER_USERNAME(Code)
Common parameters for logon-info.



PARAMETER_USERNAMES
final static Parameter PARAMETER_USERNAMES(Code)



STRINGS
final static String STRINGS(Code)
Resourcebundle containing all kind of i18n versions of parameter names and so on. Used in static block of Authentication (because no static blocks allowed in interface).





Method Detail
createParameters
Parameters createParameters(String application)(Code)
For a given authentication type returns a parameters object to fill with credentials. Parameters.toMap can be used as the second argument for org.mmbase.security.Authentication.login Given a certain 'application' this will return a org.mmbase.util.functions.Parameters which tells you excactly which parameters you can and must supply to AuthenticationData.login .



getDefaultMethod
int getDefaultMethod(String protocol)(Code)
The security implementation can override a default method. The default default method (as implemented in org.mmbase.security.Authentication for the 'http' protocol is HTTP (which means that basic authentication of the http protocol can be used), but may not be feasible for every implementation (it is e.g. useless if the security implementation does not have name/password authentication).
Parameters:
  protocol - For which protocol or null, which means 'for HTTP/1.1'.



getMethod
int getMethod(String m)(Code)

Several 'methods' to authenticate could be available. A method is a kind of protocol which must be used to authenticate some body.

Not all authentication methods may be applicable for all communication protocols (like http, https etc).

This method converts a user-friendly string describing the 'method' to a integer constant which can be used in AuthenticationData.getTypes(int) .


Parameters:
  m - A String like 'http', 'anonymous', 'loginpage', or 'delegatesession'. An integer contant. AuthenticationData.METHOD_DELEGATE, AuthenticationData.METHOD_PAGELOGON, AuthenticationData.METHOD_HTTP, AuthenticationData.METHOD_ASIS, AuthenticationData.METHOD_LOGOUT, AuthenticationData.METHOD_LOGINPAGEAuthenticationData.METHOD_SESSIONDELEGATE, AuthenticationData.METHOD_SESSIONLOGON. This method was introducedbefore java 1.5 (where the return type would more obviously be a AuthenticionMethodenumeration).
See Also:   AuthenticationData.getDefaultMethod



getNode
Node getNode(UserContext userContext) throws SecurityException(Code)
This method returns an MMBase node that corresponds with the given UserContext
since:
   MMBase-1.9



getTypes
String[] getTypes()(Code)

Gives all availabe authentication types. The first one can be used as the default. Typically, an implemention should at least support 'anonynmous' and 'class'.

Since most of the time we are using HTTP any way, types for the method AuthenticationData.METHOD_HTTP ('name/password' based) and method AuthenticationData.METHOD_LOGINPAGE ( AuthenticationData.createParameters can request anything presentable in a HTML-form) are common too.




getTypes
String[] getTypes(int method)(Code)

For a given method, returns the available 'applications'. The first one can be used as the default.

Typically for the method AuthenticationData.METHOD_ANONYMOUS at least 'anonymous' must be returned, and for AuthenticationData.METHOD_DELEGATE at least 'class'. Everything else is optional, because are not generic.




getUserBuilder
String getUserBuilder()(Code)
This method returns the builder name of the nodes that will be returned by the AuthenticationData.getNode() call.
since:
   MMBase-1.9



isValid
boolean isValid(UserContext userContext) throws SecurityException(Code)
The method returns wether the UserContext has become invalid for some reason (change in security config?)
Parameters:
  userContext - The UserContext of which we want to know the rights true when valid, otherwise false
exception:
  SecurityException - When something strange happened



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