Compoze Software, Inc.

com.compoze.examples
Class ActiveDirectoryUserAuthenticationFactory


java.lang.Object

  |

  +--com.compoze.examples.ActiveDirectoryUserAuthenticationFactory

All Implemented Interfaces:
IUserAuthenticationFactory

public class ActiveDirectoryUserAuthenticationFactory
extends java.lang.Object
implements IUserAuthenticationFactory

This class to connects to an Active Directory server to perform user authentication. This class is provided for illustrative purposes only and the source is included in the product delivery at %HARMONY_HOME%\examples\source.


Constructor Summary
ActiveDirectoryUserAuthenticationFactory(java.lang.String sSecurityPrincipal, java.lang.Object securityCredentials, java.lang.String sProviderUrl, java.lang.String sDirContext)
          Constructor.
 
Method Summary
 User getAnonymousAuthentication()
          Gets the anonymous authentication.
 User getUserAuthentication(UserInfo userInfo)
          Gets the user authentication from the given user info.
 java.util.List groups()
          Gets the list of groups (optional operation).
static void main(java.lang.String[] args)
          Main.
 java.util.List users()
          Gets the list of users (optional operation).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActiveDirectoryUserAuthenticationFactory


public ActiveDirectoryUserAuthenticationFactory(java.lang.String sSecurityPrincipal,
                                                java.lang.Object securityCredentials,
                                                java.lang.String sProviderUrl,
                                                java.lang.String sDirContext)
                                         throws java.lang.Exception
Constructor.
Parameters:
sSecurityPrincipal - the security principal (DOMAIN/Alias)
securityCredentials - the security credentials
sProviderUrl - the provider Url (ldap://myserver:389/)
sDirContext - the directory context
Method Detail

getUserAuthentication


public User getUserAuthentication(UserInfo userInfo)
                           throws InvalidAuthenticationException
Description copied from interface: IUserAuthenticationFactory
Gets the user authentication from the given user info.
Specified by:
getUserAuthentication in interface IUserAuthenticationFactory
Following copied from interface: com.compoze.security.IUserAuthenticationFactory
Parameters:
userInfo - the user information
Returns:
the user authentication collected from the user info or null if user can not be determined
Throws:
InvalidAuthenticationException - occurs if the user authentication cannot be validated (ie. the user exists but cannot be authenticated with the specified user information credentials)

getAnonymousAuthentication


public User getAnonymousAuthentication()
Description copied from interface: IUserAuthenticationFactory
Gets the anonymous authentication.
Specified by:
getAnonymousAuthentication in interface IUserAuthenticationFactory
Following copied from interface: com.compoze.security.IUserAuthenticationFactory
Returns:
the anonymous authentication or null if none can be determined

users


public java.util.List users()
                     throws java.lang.UnsupportedOperationException
Description copied from interface: IUserAuthenticationFactory
Gets the list of users (optional operation).
Specified by:
users in interface IUserAuthenticationFactory
Following copied from interface: com.compoze.security.IUserAuthenticationFactory
Returns:
the list of User objects
Throws:
java.lang.UnsupportedOperationException - obtaining a list of users is not supported by this authentication factory

groups


public java.util.List groups()
                      throws java.lang.UnsupportedOperationException
Description copied from interface: IUserAuthenticationFactory
Gets the list of groups (optional operation).
Specified by:
groups in interface IUserAuthenticationFactory
Following copied from interface: com.compoze.security.IUserAuthenticationFactory
Returns:
the list of Group objects
Throws:
java.lang.UnsupportedOperationException - obtaining a list of groups is not supported by this authentication factory

main


public static void main(java.lang.String[] args)
Main.

Compoze Software, Inc.

Copyright ©1999-2001 Compoze Software, Inc. All rights reserved.