org.objectweb.jonas.security.realm.factory
Class JResourceRemoteImpl
java.lang.Object
javax.rmi.PortableRemoteObject
org.objectweb.jonas.security.realm.factory.JResourceRemoteImpl
- All Implemented Interfaces:
- java.rmi.Remote, JResourceRemote
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
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 |
JResourceRemoteImpl
public JResourceRemoteImpl()
throws java.rmi.RemoteException
- Default constructor
- Throws:
java.rmi.RemoteException
- if super class cannot export object
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 userarrayPass
- password of the userresourceName
- 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 userarrayPass
- password of the userentryName
- 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