nl.toolforge.karma.core.vc
Class Authenticators

java.lang.Object
  extended bynl.toolforge.karma.core.vc.Authenticators

public final class Authenticators
extends java.lang.Object

When a Location - more specifically, VersionControlSystem - requires authentication, Karma provides for a mechanism whereby an dauthenticators.xml, located in the Karma configuration directory stores a username. Depending on the specific implementation of VersionControlSystem, password info is then retrieved.

The Authenticator class reads the authenticators.xml from the Karma configuration directory and can then map VersionControlSystem instances by checking if an authenticator element is present for the location. This mapping is done by checking if the id attributes for the location and the authenticator are the same.

Version:
$Id: Authenticators.java,v 1.6 2004/11/03 20:53:19 asmedes Exp $
Author:
D.A. Smedes

Method Summary
static void addAuthenticator(Authenticator authenticator)
          Adds an authenticator to authenticators.xml if the authenticator does not yet exist.
static void changePassword(AuthenticatorKey key, java.lang.String newPassword)
           
static void deleteAuthenticator(Authenticator authenticator)
          Deletes an authenticator entry from authenticators.xml.
static Authenticator getAuthenticator(Authenticator authenticator)
           
static Authenticator getAuthenticator(AuthenticatorKey key)
          Retrieves an Authenticator entry from the authenticators.xml file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

changePassword

public static void changePassword(AuthenticatorKey key,
                                  java.lang.String newPassword)
                           throws AuthenticationException
Throws:
AuthenticationException

getAuthenticator

public static Authenticator getAuthenticator(Authenticator authenticator)
                                      throws AuthenticationException
Throws:
AuthenticationException

getAuthenticator

public static Authenticator getAuthenticator(AuthenticatorKey key)
                                      throws AuthenticationException
Retrieves an Authenticator entry from the authenticators.xml file.

Parameters:
key - The key by which the Authenticator will be located.
Returns:
The Authenticator with key key.
Throws:
AuthenticationException - When no Authenticator can be found with key key.

addAuthenticator

public static void addAuthenticator(Authenticator authenticator)
                             throws AuthenticationException
Adds an authenticator to authenticators.xml if the authenticator does not yet exist.

Parameters:
authenticator -
Throws:
AuthenticationException

deleteAuthenticator

public static void deleteAuthenticator(Authenticator authenticator)
                                throws AuthenticationException
Deletes an authenticator entry from authenticators.xml.

Parameters:
authenticator -
Throws:
AuthenticationException


Copyright © 2002-2004 Toolforge. All Rights Reserved.