org.ow2.jonas.security.internal.realm.factory
Class JResourceRemoteImpl

java.lang.Object
  extended by javax.rmi.PortableRemoteObject
      extended by org.ow2.jonas.security.internal.realm.factory.JResourceRemoteImpl
All Implemented Interfaces:
Remote, JResourceRemote

public class JResourceRemoteImpl
extends 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(SecurityService ss)
          Default constructor
 
Method Summary
 JSubject authenticate(String principalName, char[] arrayPass, String resourceName)
          Authenticate a given user
 Subject authenticateJAAS(String principalName, char[] arrayPass, 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(SecurityService ss)
                    throws RemoteException
Default constructor

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

authenticate

public JSubject authenticate(String principalName,
                             char[] arrayPass,
                             String resourceName)
                      throws 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:
RemoteException - if the authentication failed

authenticateJAAS

public Subject authenticateJAAS(String principalName,
                                char[] arrayPass,
                                String entryName)
                         throws 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:
RemoteException - if the authentication failed


Copyright © 2010 OW2 Consortium. All Rights Reserved.