Save This Page
Home » jboss-5.0.0.CR1-src » org » jboss » security » jndi » [javadoc | source]
org.jboss.security.jndi
public class: JndiLoginInitialContextFactory [javadoc | source]
java.lang.Object
   org.jnp.interfaces.NamingContextFactory
      org.jboss.naming.NamingContextFactory
         org.jboss.security.jndi.JndiLoginInitialContextFactory
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.
Nested Class Summary:
public static class  JndiLoginInitialContextFactory.ContextProxy   
Fields inherited from org.jboss.naming.NamingContextFactory:
lastInitialContextEnv
Method from org.jboss.security.jndi.JndiLoginInitialContextFactory Summary:
getInitialContext
Methods from org.jboss.naming.NamingContextFactory:
getInitialContext
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.security.jndi.JndiLoginInitialContextFactory Detail:
 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.