org.objectweb.jonas.security.realm.factory
Interface JResourceRemote

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
JResourceRemoteImpl

public interface JResourceRemote
extends java.rmi.Remote

This interface defines a method to allow 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
 

Method Detail

authenticate

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

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

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

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