org.apache.ldap.server.authn
Class AuthenticationService

java.lang.Object
  extended byorg.apache.ldap.server.authn.AuthenticationService
All Implemented Interfaces:
Interceptor

public class AuthenticationService
extends java.lang.Object
implements Interceptor

An Interceptor that authenticates users.

Version:
$Rev: 159259 $, $Date: 2005-03-28 12:00:29 -0500 (Mon, 28 Mar 2005) $
Author:
Apache Directory Project (dev@directory.apache.org), Alex Karasulu (akarasulu@apache.org), Trustin Lee (trustin@apache.org)

Nested Class Summary
 class AuthenticationService.TrustedPrincipalWrapper
          Created this wrapper to pass to ctx.setPrincipal() which is public for added security.
 
Field Summary
 java.util.Map authenticators
          authenticators
 
Constructor Summary
AuthenticationService()
          Creates an authentication service interceptor.
 
Method Summary
 void destroy()
          Deinitializes this interceptor.
 java.util.Collection getAuthenticators(java.lang.String type)
          Gets the authenticators with a specific type.
 void init(InterceptorContext ctx)
          Intializes this interceptor.
 void process(NextInterceptor nextProcessor, Invocation call)
          Filters a particular invocation.
 void register(Authenticator authenticator)
          Registers an AuthenticationService with the AuthenticationService.
 void unregister(Authenticator authenticator)
          Unregisters an AuthenticationService with the AuthenticationService.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

authenticators

public java.util.Map authenticators
authenticators

Constructor Detail

AuthenticationService

public AuthenticationService()
Creates an authentication service interceptor.

Method Detail

init

public void init(InterceptorContext ctx)
          throws javax.naming.NamingException
Description copied from interface: Interceptor
Intializes this interceptor. This is invoked by directory service provider when this intercepter is loaded into interceptor chain.

Specified by:
init in interface Interceptor
Parameters:
ctx - the configuration properties for this interceptor
Throws:
javax.naming.NamingException - if failed to initialize this interceptor

destroy

public void destroy()
Description copied from interface: Interceptor
Deinitializes this interceptor. This is invoked by directory service provider when this intercepter is unloaded from interceptor chain.

Specified by:
destroy in interface Interceptor

register

public void register(Authenticator authenticator)
Registers an AuthenticationService with the AuthenticationService. Called by each AuthenticationService implementation after it has started to register for authentication operation calls.

Parameters:
authenticator - AuthenticationService component to register with this AuthenticatorService.

unregister

public void unregister(Authenticator authenticator)
Unregisters an AuthenticationService with the AuthenticationService. Called for each registered AuthenticationService right before it is to be stopped. This prevents protocol server calls from reaching the Backend and effectively puts the ContextPartition's naming context offline.

Parameters:
authenticator - AuthenticationService component to unregister with this AuthenticationService.

getAuthenticators

public java.util.Collection getAuthenticators(java.lang.String type)
Gets the authenticators with a specific type.

Parameters:
type - the authentication type
Returns:
the authenticators with the specified type

process

public void process(NextInterceptor nextProcessor,
                    Invocation call)
             throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters a particular invocation. You can pass control to nextInterceptor by calling NextInterceptor.process( org.apache.ldap.server.invocation.Invocation)

Specified by:
process in interface Interceptor
Parameters:
nextProcessor - the next interceptor in the interceptor chain
call - the invocation to process
Throws:
javax.naming.NamingException - on failures while handling the invocation


Copyright © 2002-2005 . All Rights Reserved.