org.objectweb.jonas.security.realm
Class JRealmJetty42

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

public class JRealmJetty42
extends java.lang.Object

Implementation of a Realm. Use any JOnAS realm by specifying the resource name

Author:
Greg Wilkins for the HashUserRealm, Florent Benoit : Jetty 4.2.x / JOnAS 3.1

Constructor Summary
JRealmJetty42(java.lang.String resourceName)
          Constructor
JRealmJetty42(java.lang.String name, java.lang.String resourceName)
          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

JRealmJetty42

public JRealmJetty42(java.lang.String resourceName)
              throws java.lang.Exception
Constructor

Parameters:
resourceName - name of the resource to use
Throws:
java.lang.Exception - if the resource can't be retrieved

JRealmJetty42

public JRealmJetty42(java.lang.String name,
                     java.lang.String resourceName)
              throws java.lang.Exception
Constructor

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

getName

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

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

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

popRole

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

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