org.apache.juddi.v3.auth
Class XMLDocAuthenticator

java.lang.Object
  extended by org.apache.juddi.v3.auth.XMLDocAuthenticator
All Implemented Interfaces:
Authenticator
Direct Known Subclasses:
CryptedXMLDocAuthenticator

public class XMLDocAuthenticator
extends java.lang.Object
implements Authenticator

This is a simple implementation of jUDDI's Authenticator interface. The credential store is simply an unencrypted xml document called 'juddi.users' that can be found in jUDDI's config directory. Below is an example of what you might find in this document. Example juddi.users document: =============================

Author:
Steve Viens (sviens@apache.org), Kurt T Stam, Jeff Faath

Constructor Summary
XMLDocAuthenticator()
           
 
Method Summary
 java.lang.String authenticate(java.lang.String userID, java.lang.String credential)
           
protected  java.lang.String getFilename()
           
 UddiEntityPublisher identify(java.lang.String authInfo, java.lang.String authorizedName)
           
 void readUserFile()
          Read user data from the juddi-users file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLDocAuthenticator

public XMLDocAuthenticator()
                    throws javax.xml.bind.JAXBException,
                           java.io.IOException,
                           org.apache.commons.configuration.ConfigurationException
Throws:
javax.xml.bind.JAXBException
java.io.IOException
org.apache.commons.configuration.ConfigurationException
Method Detail

getFilename

protected java.lang.String getFilename()
                                throws org.apache.commons.configuration.ConfigurationException
Throws:
org.apache.commons.configuration.ConfigurationException

readUserFile

public void readUserFile()
                  throws javax.xml.bind.JAXBException,
                         java.io.IOException,
                         org.apache.commons.configuration.ConfigurationException
Read user data from the juddi-users file.

Throws:
java.io.IOException - when the file cannot be opened JAXBException when the content is misformed.
org.apache.commons.configuration.ConfigurationException
javax.xml.bind.JAXBException

authenticate

public java.lang.String authenticate(java.lang.String userID,
                                     java.lang.String credential)
                              throws AuthenticationException,
                                     FatalErrorException
Specified by:
authenticate in interface Authenticator
Parameters:
userID - - userId of the user making the registry request
credential - - 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
Specified by:
identify in interface Authenticator
Throws:
AuthenticationException


Copyright © 2004-2010. All Rights Reserved.