org.jboss.security.jndi
Class JndiLoginInitialContextFactory
java.lang.Object
org.jnp.interfaces.NamingContextFactory
org.jboss.security.jndi.JndiLoginInitialContextFactory
- All Implemented Interfaces:
- InitialContextFactory, ObjectFactory
public class JndiLoginInitialContextFactory
- 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 security context
identity is populated with the username obtained from the
Context.SECURITY_PRINCIPAL env property and the credentials from the
Context.SECURITY_CREDENTIALS env property. There is no actual authentication
of this information. It is merely made available to the jboss transport
layer for incorporation into subsequent invocations. Authentication and
authorization will occur on the server.
- Version:
- $Revision: 57203 $
- Author:
- Scott.Stark@jboss.org
- See Also:
InitialContextFactory
Method Summary |
Context |
getInitialContext(Hashtable env)
Take the env Context.SECURITY_PRINCIPAL and Context.SECURITY_CREDENTIALS
and propagate these to the SecurityAssociation principal and credential. |
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 |
JndiLoginInitialContextFactory
public JndiLoginInitialContextFactory()
getInitialContext
public Context getInitialContext(Hashtable env)
throws NamingException
- Take the env Context.SECURITY_PRINCIPAL and Context.SECURITY_CREDENTIALS
and propagate these to the SecurityAssociation principal and credential.
If Context.SECURITY_PRINCIPAL is a java.security.Principal then it is
used as is, otherwise its treated as a name using toString and a
SimplePrincipal is created. The Context.SECURITY_CREDENTIALS is passed
as is.
- Specified by:
getInitialContext
in interface InitialContextFactory
- Overrides:
getInitialContext
in class org.jnp.interfaces.NamingContextFactory
- Parameters:
env
-
- Throws:
NamingException
Copyright © 2002 JBoss Group, LLC. All Rights Reserved.