For the latest news and information visit
The GNU Crypto project

gnu.crypto.sasl
Interface IAuthInfoProvider

All Known Implementing Classes:
CramMD5AuthInfoProvider, PlainAuthInfoProvider, SRPAuthInfoProvider

public interface IAuthInfoProvider

The visible methods of any authentication information provider.

Version:
$Revision: 1.2 $

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

Method Detail

activate

public void activate(java.util.Map context)
              throws javax.security.sasl.AuthenticationException
Activates (initialises) this provider instance. SHOULD be the first method invoked on the provider.

Parameters:
context - a collection of name-value bindings describing the activation context.
Throws:
javax.security.sasl.AuthenticationException - if an exception occurs during the operation.

passivate

public void passivate()
               throws javax.security.sasl.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.

Throws:
javax.security.sasl.AuthenticationException - if an exception occurs during the operation.

contains

public boolean contains(java.lang.String userName)
                 throws javax.security.sasl.AuthenticationException
Checks if a user with a designated name is known to this provider.

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.
Throws:
javax.security.sasl.AuthenticationException - if an exception occurs during the operation.

lookup

public java.util.Map lookup(java.util.Map userID)
                     throws javax.security.sasl.AuthenticationException
Returns a collection of information about a designated user. The contents of the returned map is provider-specific of name-to-value mappings.

Parameters:
userID - a map of name-to-value bindings that fully describe a user.
Returns:
a collection of information about the designated user.
Throws:
javax.security.sasl.AuthenticationException - if an exception occurs during the operation.

update

public void update(java.util.Map userCredentials)
            throws javax.security.sasl.AuthenticationException
Updates the credentials of a designated user.

Parameters:
userCredentials - a map of name-to-value bindings that fully describe a user, including per new credentials.
Throws:
javax.security.sasl.AuthenticationException - if an exception occurs during the operation.

getConfiguration

public java.util.Map getConfiguration(java.lang.String mode)
                               throws javax.security.sasl.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.

Parameters:
mode - a unique identifier describing the operational mode.
Returns:
a collection of name-to-value bindings describing the designated mode.
Throws:
javax.security.sasl.AuthenticationException - if an exception occurs during the operation.

For the latest news and information visit
The GNU Crypto project

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