org.apache.directory.server.kerberos.shared.store
Class JndiPrincipalStoreImpl

java.lang.Object
  extended by org.apache.directory.server.kerberos.shared.store.JndiPrincipalStoreImpl
All Implemented Interfaces:
PrincipalStore

public class JndiPrincipalStoreImpl
extends java.lang.Object
implements PrincipalStore

A JNDI-backed implementation of the PrincipalStore interface. This PrincipalStore uses the Strategy pattern to either serve principals based on a single base DN or to lookup catalog mappings from configuration in the DIT. The strategy is chosen based on the presence of a catalog base DN. If the catalog base DN is not present, the single entry base DN is searched, instead.

Version:
$Rev: 540371 $, $Date: 2007-05-21 20:00:43 -0400 (Mon, 21 May 2007) $
Author:
Apache Directory Project

Constructor Summary
JndiPrincipalStoreImpl(org.apache.directory.server.protocol.shared.ServiceConfiguration config, javax.naming.spi.InitialContextFactory factory)
          Creates a new instance of JndiPrincipalStoreImpl.
 
Method Summary
 java.lang.String addPrincipal(PrincipalStoreEntry entry)
          Add a principal.
 java.lang.String changePassword(javax.security.auth.kerberos.KerberosPrincipal principal, java.lang.String newPassword)
          Change a principal's password.
 java.lang.String deletePrincipal(javax.security.auth.kerberos.KerberosPrincipal principal)
          Delete a principal.
 PrincipalStoreEntry[] getAllPrincipals(java.lang.String realm)
          Get all principals for a given realm.
 PrincipalStoreEntry getPrincipal(javax.security.auth.kerberos.KerberosPrincipal principal)
          Get a PrincipalStoreEntry given a Kerberos principal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JndiPrincipalStoreImpl

public JndiPrincipalStoreImpl(org.apache.directory.server.protocol.shared.ServiceConfiguration config,
                              javax.naming.spi.InitialContextFactory factory)
Creates a new instance of JndiPrincipalStoreImpl.

Parameters:
config -
factory -
Method Detail

addPrincipal

public java.lang.String addPrincipal(PrincipalStoreEntry entry)
                              throws java.lang.Exception
Description copied from interface: PrincipalStore
Add a principal.

Specified by:
addPrincipal in interface PrincipalStore
Returns:
The name of the principal being added.
Throws:
java.lang.Exception

deletePrincipal

public java.lang.String deletePrincipal(javax.security.auth.kerberos.KerberosPrincipal principal)
                                 throws java.lang.Exception
Description copied from interface: PrincipalStore
Delete a principal.

Specified by:
deletePrincipal in interface PrincipalStore
Returns:
The name of the principal being deleted.
Throws:
java.lang.Exception

getAllPrincipals

public PrincipalStoreEntry[] getAllPrincipals(java.lang.String realm)
                                       throws java.lang.Exception
Description copied from interface: PrincipalStore
Get all principals for a given realm.

Specified by:
getAllPrincipals in interface PrincipalStore
Returns:
An array of PrincipalStoreEntry's.
Throws:
java.lang.Exception

getPrincipal

public PrincipalStoreEntry getPrincipal(javax.security.auth.kerberos.KerberosPrincipal principal)
                                 throws java.lang.Exception
Description copied from interface: PrincipalStore
Get a PrincipalStoreEntry given a Kerberos principal.

Specified by:
getPrincipal in interface PrincipalStore
Returns:
The PrincipalStoreEntry for the given Kerberos principal.
Throws:
java.lang.Exception

changePassword

public java.lang.String changePassword(javax.security.auth.kerberos.KerberosPrincipal principal,
                                       java.lang.String newPassword)
                                throws java.lang.Exception
Description copied from interface: PrincipalStore
Change a principal's password.

Specified by:
changePassword in interface PrincipalStore
Returns:
The name of the principal whose password is being changed.
Throws:
java.lang.Exception


Copyright © 2003-2007 The Apache Software Foundation. All Rights Reserved.