org.apache.juddi.v3.auth
Class LdapSimpleAuthenticator
java.lang.Object
org.apache.juddi.v3.auth.LdapSimpleAuthenticator
- All Implemented Interfaces:
- Authenticator
public class LdapSimpleAuthenticator
- extends java.lang.Object
- implements Authenticator
This is a implementation of jUDDI's Authenticator interface, that uses the
LDAP.
Usage:
To use this class you must add the following properties to the
juddiv3.properties file:
# The JBoss Authenticator
juddi.authenticator=org.apache.juddi.v3.auth.LdapSimpleAuthenticator
# LDAP authentication URL
juddi.authenticator.url=ldap://localhost:389
This authenticator assumes that the publisher username is the same as the LDAP
principal name, which may not be the case as the LDAP principal might be a bind name.
This class could easily be extended so that the uid of the LDAP authenticated user is
used, or to authenticate by group.
This class was tested with OpenLDAP.
- Author:
- Tom Cunningham, Gunnlaugur Sigurðsson
Method Summary |
java.lang.String |
authenticate(java.lang.String authorizedName,
java.lang.String cred)
|
UddiEntityPublisher |
identify(java.lang.String authInfo,
java.lang.String authorizedName)
|
void |
init(java.lang.String url)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LdapSimpleAuthenticator
public LdapSimpleAuthenticator()
throws javax.naming.NamingException
- Throws:
javax.naming.NamingException
LdapSimpleAuthenticator
public LdapSimpleAuthenticator(java.lang.String url)
throws javax.naming.NamingException
- Throws:
javax.naming.NamingException
init
public void init(java.lang.String url)
throws javax.naming.NamingException
- Throws:
javax.naming.NamingException
authenticate
public java.lang.String authenticate(java.lang.String authorizedName,
java.lang.String cred)
throws AuthenticationException,
FatalErrorException
- Specified by:
authenticate
in interface Authenticator
- Parameters:
authorizedName
- - userId of the user making the registry requestcred
- - some authentical creditial (i.e. a password) which can be used to
authenticate the user.
- Returns:
- The publisherID for this user
- Throws:
AuthenticationException
FatalErrorException
identify
public UddiEntityPublisher identify(java.lang.String authInfo,
java.lang.String authorizedName)
throws AuthenticationException,
FatalErrorException
- Specified by:
identify
in interface Authenticator
- Throws:
AuthenticationException
FatalErrorException
Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.