org.objectweb.jonas.security.realm.factory
Class JResourceRemoteImpl

java.lang.Object
  extended byjavax.rmi.PortableRemoteObject
      extended byorg.objectweb.jonas.security.realm.factory.JResourceRemoteImpl
All Implemented Interfaces:
JResourceRemote, java.rmi.Remote

public class JResourceRemoteImpl
extends javax.rmi.PortableRemoteObject
implements JResourceRemote

This class allow to make authentication on server side even for Client container or remote applications

Author:
Florent Benoit

Constructor Summary
JResourceRemoteImpl()
          Default constructor
 
Method Summary
 JSubject authenticate(java.lang.String principalName, char[] arrayPass, java.lang.String resourceName)
          Authenticate a given user
 javax.security.auth.Subject authenticateJAAS(java.lang.String principalName, char[] arrayPass, java.lang.String entryName)
          Authenticate a given user
 
Methods inherited from class javax.rmi.PortableRemoteObject
connect, exportObject, narrow, toStub, unexportObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JResourceRemoteImpl

public JResourceRemoteImpl()
                    throws java.rmi.RemoteException
Default constructor

Throws:
java.rmi.RemoteException - if super class cannot export object
Method Detail

authenticate

public JSubject authenticate(java.lang.String principalName,
                             char[] arrayPass,
                             java.lang.String resourceName)
                      throws java.rmi.RemoteException
Authenticate a given user

Specified by:
authenticate in interface JResourceRemote
Parameters:
principalName - name of the user
arrayPass - password of the user
resourceName - type of resource to use to register ( memory, jdbc, ldap)
Returns:
an authenticated subject if it succeed
Throws:
java.rmi.RemoteException - if the authentication failed

authenticateJAAS

public javax.security.auth.Subject authenticateJAAS(java.lang.String principalName,
                                                    char[] arrayPass,
                                                    java.lang.String entryName)
                                             throws java.rmi.RemoteException
Authenticate a given user

Specified by:
authenticateJAAS in interface JResourceRemote
Parameters:
principalName - name of the user
arrayPass - password of the user
entryName - the name of the JAAS entry to search in jaas configuration file
Returns:
an authenticated subject if it succeed
Throws:
java.rmi.RemoteException - if the authentication failed