no.feide.moria.directory.backend
Interface DirectoryManagerBackend

All Known Implementing Classes:
DummyBackend, JNDIBackend

public interface DirectoryManagerBackend


Field Summary
static java.lang.String ATTRIBUTE_VALUE_CHARSET
          The character set used when encoding attribute values.
static java.lang.String[] VIRTUAL_ATTRIBUTES
          The list of "virtual" attributes, that is, attributes that are generated by Moria itself, and not read from any physical attribute through the backend.
 
Method Summary
 java.util.HashMap authenticate(Credentials userCredentials, java.lang.String[] attributeRequest)
          Attempts to authenticate a user and retrieve a set of user attributes.
 void close()
          Closes the current backend and releases any resources.
 void open(IndexedReference[] references)
          Opens a new backend connection.
 boolean userExists(java.lang.String username)
          Checks whether a given user actually exists.
 

Field Detail

ATTRIBUTE_VALUE_CHARSET

static final java.lang.String ATTRIBUTE_VALUE_CHARSET
The character set used when encoding attribute values.

Current value is "ISO-8859-1".

See Also:
Constant Field Values

VIRTUAL_ATTRIBUTES

static final java.lang.String[] VIRTUAL_ATTRIBUTES
The list of "virtual" attributes, that is, attributes that are generated by Moria itself, and not read from any physical attribute through the backend.

Current value is {"tgt"}.

Method Detail

open

void open(IndexedReference[] references)
Opens a new backend connection.

Parameters:
references - The backend references in question. Cannot be null, and must contain at least one reference.

userExists

boolean userExists(java.lang.String username)
                   throws BackendException
Checks whether a given user actually exists.

Parameters:
username - The username to check for.
Returns:
true if we can find a user element with the given username, otherwise false.
Throws:
BackendException - If there was a problem accessing the backend.

authenticate

java.util.HashMap authenticate(Credentials userCredentials,
                               java.lang.String[] attributeRequest)
                               throws AuthenticationFailedException,
                                      BackendException
Attempts to authenticate a user and retrieve a set of user attributes.

Parameters:
userCredentials - The user's credentials. Cannot be null.
attributeRequest - A list of requested attributes from the user object. May be null or an empty array. Not case sensitive.
Returns:
The requested user attributes, if any are requested and if they can be retrieved from the backend following a successful authentication. Otherwise, an empty HashMap. Attribute values should be encoded using ISO-8859-1.
Throws:
AuthenticationFailedException - If the authentication fails.
BackendException - If there was a problem accessing the backend.

close

void close()
Closes the current backend and releases any resources.



Copyright © 2001-2006 UNINETT FAS. All Rights Reserved.