gnu.crypto.sasl.crammd5

Class CramMD5AuthInfoProvider

Implemented Interfaces:
IAuthInfoProvider

public class CramMD5AuthInfoProvider
extends Object
implements IAuthInfoProvider

The CRAM-MD5 mechanism authentication information provider implementation.
Version:
$Revision: 1.2 $

Method Summary

void
activate(Map context)
Activates (initialises) this provider instance.
boolean
contains(String userName)
Checks if a user with a designated name is known to this provider.
Map
getConfiguration(String mode)
A provider may operate in more than mode; e.g.
Map
lookup(Map userID)
Returns a collection of information about a designated user.
void
passivate()
Passivates (releases) this provider instance.
void
update(Map userCredentials)
Updates the credentials of a designated user.

Method Details

activate

public void activate(Map context)
            throws AuthenticationException
Activates (initialises) this provider instance. SHOULD be the first method invoked on the provider.
Specified by:
activate in interface IAuthInfoProvider
Parameters:
context - a collection of name-value bindings describing the activation context.

contains

public boolean contains(String userName)
            throws AuthenticationException
Checks if a user with a designated name is known to this provider.
Specified by:
contains in interface IAuthInfoProvider
Parameters:
userName - the name of a user to check.
Returns:
true if the user with the designated name is known to this provider; false otherwise.

getConfiguration

public Map getConfiguration(String mode)
            throws AuthenticationException
A provider may operate in more than mode; e.g. SRP-II caters for user credentials computed in more than one message digest algorithm. This method returns the set of name-to-value bindings describing the mode of the provider.
Specified by:
getConfiguration in interface IAuthInfoProvider
Parameters:
mode - a unique identifier describing the operational mode.
Returns:
a collection of name-to-value bindings describing the designated mode.

lookup

public Map lookup(Map userID)
            throws AuthenticationException
Returns a collection of information about a designated user. The contents of the returned map is provider-specific of name-to-value mappings.
Specified by:
lookup in interface IAuthInfoProvider
Parameters:
userID - a map of name-to-value bindings that fully describe a user.
Returns:
a collection of information about the designated user.

passivate

public void passivate()
            throws AuthenticationException
Passivates (releases) this provider instance. SHOULD be the last method invoked on the provider. Once it is done, no other method may be invoked on the same instance before it is activated agains.
Specified by:
passivate in interface IAuthInfoProvider

update

public void update(Map userCredentials)
            throws AuthenticationException
Updates the credentials of a designated user.
Specified by:
update in interface IAuthInfoProvider
Parameters:
userCredentials - a map of name-to-value bindings that fully describe a user, including per new credentials.

Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.