Java Doc for JNDIAuthenticatorImpl.java in  » Project-Management » XPlanner-0.7b7 » com » sabre » security » jndi » 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 » Project Management » XPlanner 0.7b7 » com.sabre.security.jndi 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sabre.security.jndi.JNDIAuthenticatorImpl

JNDIAuthenticatorImpl
public class JNDIAuthenticatorImpl implements JNDIAuthenticator(Code)


Field Summary
protected  DirContextcontext
     The directory context linking us to our directory server.
protected  StringcontextFactory
     The JNDI context factory used to acquire our InitialContext.
final protected static  Stringinfo
     Descriptive information about this Realm implementation.
final public static  Loggerlog
     Logger.
protected  MessageFormatroleFormat
     The MessageFormat object associated with the current roleSearch.
protected  MessageFormatuserPatternFormat
     The MessageFormat object associated with the current userPattern.
protected  MessageFormatuserSearchFormat
     The MessageFormat object associated with the current userSearch.


Method Summary
public synchronized  Subjectauthenticate(String username, String credentials)
     Return the Principal associated with the specified username and credentials, if there is one; otherwise return null.

If there are any errors with the JDBC connection, executing the query or anything we return null (don't authenticate).

protected  booleanbindAsUser(User user, String credentials)
    
public  voidcheckCredentials(String userName, String credentials)
     Check whether the given User can be authenticated with the given credentials.
public  voidcloseContext()
     Close any open connection to the directory server for this Realm.
protected  booleancompareCredentials(User info, String credentials)
     Check whether the credentials presented by the user match those retrieved from the directory.
protected  Stringdigest(String credentials)
    
protected  HashtablegetDirectoryContextEnvironment(String username, String credentials)
     Create our directory context configuration.
public  ListgetRoles(User user)
     Return a List of roles associated with the given User.
protected  UsergetUser(String username)
     Return a User object containing information about the user with the specified username, if found in the directory; otherwise return null.

If the userPassword configuration attribute is specified, the value of that attribute is retrieved from the user's directory entry.

protected  UsergetUserByPattern(String username, String[] attrIds)
     Use the UserPattern configuration attribute to locate the directory entry for the user with the specified username and return a User object; otherwise return null.
protected  UsergetUserBySearch(String username, String[] attrIds)
     Search the directory to return a User object containing information about the user with the specified username, if found in the directory; otherwise return null.
public  booleanisAnonymousConnection()
    
public  booleanisFixedUserConnection()
    
public  voidlogMap(Map options)
    
public  voidopen()
     Open (if necessary) and return a connection to the configured directory server for this Realm.
public  voidopen(String username, String credentials)
    
public  voidsetAuthentication(String authentication)
    
public  voidsetConnectionPassword(String connectionPassword)
    
public  voidsetConnectionURL(String connectionURL)
    
public  voidsetConnectionUser(String connectionUser)
    
public  voidsetContextFactory(String contextFactory)
    
public  voidsetDebug(String debug)
    
public  voidsetDigest(String algorithm)
    
public  voidsetOptions(Map options)
    
public  voidsetProtocol(String protocol)
    
public  voidsetReferrals(String referrals)
    
public  voidsetRoleBase(String roleBase)
    
public  voidsetRoleName(String roleName)
    
public  voidsetRoleSearch(String roleSearch)
    
public  voidsetRoleSubtree(String roleSubtree)
    
public  voidsetUserBase(String userBase)
    
public  voidsetUserPassword(String userPassword)
    
public  voidsetUserPattern(String userPattern)
    
public  voidsetUserRoleName(String userRoleName)
    
public  voidsetUserSearch(String userSearch)
    
public  voidsetUserSubtree(String userSubtree)
    

Field Detail
context
protected DirContext context(Code)
The directory context linking us to our directory server.



contextFactory
protected String contextFactory(Code)
The JNDI context factory used to acquire our InitialContext. By default, assumes use of an LDAP server using the standard JNDI LDAP provider.



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



log
final public static Logger log(Code)
Logger.



roleFormat
protected MessageFormat roleFormat(Code)
The MessageFormat object associated with the current roleSearch.



userPatternFormat
protected MessageFormat userPatternFormat(Code)
The MessageFormat object associated with the current userPattern.



userSearchFormat
protected MessageFormat userSearchFormat(Code)
The MessageFormat object associated with the current userSearch.





Method Detail
authenticate
public synchronized Subject authenticate(String username, String credentials) throws AuthenticationException(Code)
Return the Principal associated with the specified username and credentials, if there is one; otherwise return null.

If there are any errors with the JDBC connection, executing the query or anything we return null (don't authenticate). This event is also logged, and the connection will be closed so that a subsequent request will automatically re-open it.
Parameters:
  username - Username of the Principal to look up
Parameters:
  credentials - Password or other credentials to use inauthenticating this username




bindAsUser
protected boolean bindAsUser(User user, String credentials) throws NamingException(Code)
Check credentials by binding to the directory as the user
Parameters:
  user - The User to be authenticated
Parameters:
  credentials - Authentication credentials
throws:
  javax.naming.NamingException - if a directory server error occurs



checkCredentials
public void checkCredentials(String userName, String credentials) throws com.sabre.security.jndi.AuthenticationException(Code)
Check whether the given User can be authenticated with the given credentials. If the userPassword configuration attribute is specified, the credentials previously retrieved from the directory are compared explicitly with those presented by the user. Otherwise the presented credentials are checked by binding to the directory as the user.
Parameters:
  userName - The UserName to be authenticated
Parameters:
  credentials - The credentials presented by the user
throws:
  com.sabre.security.jndi.AuthenticationException - if a directory server error occursif authentication fails



closeContext
public void closeContext()(Code)
Close any open connection to the directory server for this Realm.



compareCredentials
protected boolean compareCredentials(User info, String credentials) throws NamingException(Code)
Check whether the credentials presented by the user match those retrieved from the directory.
Parameters:
  info - The User to be authenticated
Parameters:
  credentials - Authentication credentials
throws:
  javax.naming.NamingException - if a directory server error occurs



digest
protected String digest(String credentials)(Code)



getDirectoryContextEnvironment
protected Hashtable getDirectoryContextEnvironment(String username, String credentials)(Code)
Create our directory context configuration. java.util.Hashtable the configuration for the directory context.



getRoles
public List getRoles(User user) throws NamingException(Code)
Return a List of roles associated with the given User. Any roles present in the user's directory entry are supplemented by a directory search. If no roles are associated with this user, a zero-length List is returned.
Parameters:
  user - The User to be checked
throws:
  javax.naming.NamingException - if a directory server error occurs



getUser
protected User getUser(String username) throws NamingException(Code)
Return a User object containing information about the user with the specified username, if found in the directory; otherwise return null.

If the userPassword configuration attribute is specified, the value of that attribute is retrieved from the user's directory entry. If the userRoleName configuration attribute is specified, all values of that attribute are retrieved from the directory entry.
Parameters:
  username - Username to be looked up
throws:
  javax.naming.NamingException - if a directory server error occurs




getUserByPattern
protected User getUserByPattern(String username, String[] attrIds) throws NamingException(Code)
Use the UserPattern configuration attribute to locate the directory entry for the user with the specified username and return a User object; otherwise return null.
Parameters:
  username - The username
Parameters:
  attrIds - String[]containing names of attributes toretrieve.
throws:
  javax.naming.NamingException - if a directory server error occurs



getUserBySearch
protected User getUserBySearch(String username, String[] attrIds) throws NamingException(Code)
Search the directory to return a User object containing information about the user with the specified username, if found in the directory; otherwise return null.
Parameters:
  username - The username
Parameters:
  attrIds - String[]containing names of attributes to retrieve.
throws:
  javax.naming.NamingException - if a directory server error occurs



isAnonymousConnection
public boolean isAnonymousConnection()(Code)



isFixedUserConnection
public boolean isFixedUserConnection()(Code)



logMap
public void logMap(Map options)(Code)



open
public void open() throws com.sabre.security.jndi.AuthenticationException(Code)
Open (if necessary) and return a connection to the configured directory server for this Realm.
throws:
  com.sabre.security.jndi.AuthenticationException - if a directory server error occurs



open
public void open(String username, String credentials) throws com.sabre.security.jndi.AuthenticationException(Code)



setAuthentication
public void setAuthentication(String authentication)(Code)



setConnectionPassword
public void setConnectionPassword(String connectionPassword)(Code)



setConnectionURL
public void setConnectionURL(String connectionURL)(Code)



setConnectionUser
public void setConnectionUser(String connectionUser)(Code)



setContextFactory
public void setContextFactory(String contextFactory)(Code)



setDebug
public void setDebug(String debug)(Code)



setDigest
public void setDigest(String algorithm) throws NoSuchAlgorithmException(Code)



setOptions
public void setOptions(Map options)(Code)



setProtocol
public void setProtocol(String protocol)(Code)



setReferrals
public void setReferrals(String referrals)(Code)



setRoleBase
public void setRoleBase(String roleBase)(Code)



setRoleName
public void setRoleName(String roleName)(Code)



setRoleSearch
public void setRoleSearch(String roleSearch)(Code)



setRoleSubtree
public void setRoleSubtree(String roleSubtree)(Code)



setUserBase
public void setUserBase(String userBase)(Code)



setUserPassword
public void setUserPassword(String userPassword)(Code)



setUserPattern
public void setUserPattern(String userPattern)(Code)



setUserRoleName
public void setUserRoleName(String userRoleName)(Code)



setUserSearch
public void setUserSearch(String userSearch)(Code)



setUserSubtree
public void setUserSubtree(String userSubtree)(Code)



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.