org.objectweb.jonas.security.realm
Class JRealmJAASJetty42

java.lang.Object
  extended byorg.objectweb.jonas.security.realm.JRealmJAASJetty42

public class JRealmJAASJetty42
extends java.lang.Object

Implementation of a JAAS Realm. (by a wrapper) It uses the entry JAAS_CONFIG_NAME from the JAAS config file

Author:
Greg Wilkins for the HashUserRealm, Alexandre Thaveau (JAAS support with JOnAS), Marc-Antoine Bourgeot (JAAS support with JOnAS)

Constructor Summary
JRealmJAASJetty42()
          Constructor
JRealmJAASJetty42(java.lang.String name)
          Constructor
 
Method Summary
 UserPrincipal authenticate(java.lang.String username, java.lang.Object credentials, HttpRequest request)
          Authenticate a user with a specific username and credentials
 void disassociate(UserPrincipal user)
          Disassociate a user Not implemented
 java.lang.String getName()
           
 UserPrincipal popRole(UserPrincipal user)
          Pop a role to a user Not implemented
 UserPrincipal pushRole(UserPrincipal user, java.lang.String role)
          Push a role to a user Not implemented
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JRealmJAASJetty42

public JRealmJAASJetty42()
                  throws java.lang.Exception
Constructor

Throws:
java.lang.Exception - if the resource can't be retrieved

JRealmJAASJetty42

public JRealmJAASJetty42(java.lang.String name)
                  throws java.lang.Exception
Constructor

Parameters:
name - name of the realm
Throws:
java.lang.Exception - if the resource can't be retrieved
Method Detail

authenticate

public UserPrincipal authenticate(java.lang.String username,
                                  java.lang.Object credentials,
                                  HttpRequest request)
Authenticate a user with a specific username and credentials

Parameters:
username - name of the user
credentials - credential of the user
request - httprequest
Returns:
a Jetty principal

disassociate

public void disassociate(UserPrincipal user)
Disassociate a user Not implemented

Parameters:
user - the given user

getName

public java.lang.String getName()
Returns:
The realm name.

popRole

public UserPrincipal popRole(UserPrincipal user)
Pop a role to a user Not implemented

Parameters:
user - the given user
Returns:
the new principal

pushRole

public UserPrincipal pushRole(UserPrincipal user,
                              java.lang.String role)
Push a role to a user Not implemented

Parameters:
user - the given user
role - the role to push
Returns:
the new principal