org.jboss.security.jndi
Class LoginInitialContextFactory

java.lang.Object
  extended byorg.jnp.interfaces.NamingContextFactory
      extended byorg.jboss.security.jndi.LoginInitialContextFactory
All Implemented Interfaces:
InitialContextFactory, ObjectFactory

public class LoginInitialContextFactory
extends org.jnp.interfaces.NamingContextFactory

A naming provider InitialContextFactory implementation that combines the authentication phase with the InitialContext creation. During the getInitialContext callback from the JNDI naming layer a JAAS LoginContext is created using the login configuration name passed in as the Context.SECURITY_PROTOCOL env property. The CallbackHandler used is a org.jboss.security.auth.callback.UsernamePasswordHandler that is populated with the username obtained from the Context.SECURITY_PRINCIPAL env property and the credentials from the Context.SECURITY_CREDENTIALS env property.

Version:
$Revision: 1.4.6.1 $
Author:
Scott.Stark@jboss.org
See Also:
InitialContextFactory

Constructor Summary
LoginInitialContextFactory()
           
 
Method Summary
 Context getInitialContext(Hashtable env)
          Create new initial context by invoking the NamingContextFactory version of this method after performing a JAAS login.
 
Methods inherited from class org.jnp.interfaces.NamingContextFactory
getObjectInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoginInitialContextFactory

public LoginInitialContextFactory()
Method Detail

getInitialContext

public Context getInitialContext(Hashtable env)
                          throws NamingException
Create new initial context by invoking the NamingContextFactory version of this method after performing a JAAS login.

Throws:
NamingException


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.