Skip navigation links

Oracle Role Manager Java API Reference
10g (10.1.4)
E14613-01


oracle.iam.rm.client
Class ClientFactory

java.lang.Object
  extended by oracle.iam.rm.client.ClientFactory


public class ClientFactory
extends java.lang.Object

The source for clients for the Web Client API.


Constructor Summary
ClientFactory()
           

 

Method Summary
static IdentityToken authenticatePerson(java.lang.String username)
          Authenticates as a person identified by the provided userId.
static IdentityToken authenticatePersonFromCredentials(java.lang.String username, java.lang.String password)
          Authenticates as a person identified by the provided userId) and password.
static IdentityToken authenticateSystemUser(java.lang.String username, java.lang.String password)
          Authenticates as a system identity with the provided userId and password.
static Client newClient(IdentityToken identityToken)
          Creates a new Client bound to the provided IdentityToken (and hence the authentication details).
static void setAlternateJndiPath(java.lang.String alternateJndiPath)
          Sets the Server EJB's JNDI path to something other than the default, typically only used for integration reasons.
static void synchronizeIdentityTokenWithServer(IdentityToken identityToken)
          Resynchronizes the local copy of cached state with the server.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

ClientFactory

public ClientFactory()

Method Detail

authenticateSystemUser

public static IdentityToken authenticateSystemUser(java.lang.String username,
                                                   java.lang.String password)
                                            throws javax.security.auth.login.LoginException
Authenticates as a system identity with the provided userId and password.
Parameters:
username - userId to authenticate with
password - password to authenticate with that should match the stored password associated with the provided user ID
Returns:
IdentityToken representing the authentication and that is used for client connection.
Throws:
javax.security.auth.login.LoginException - if the login fails for any reason

authenticatePerson

public static IdentityToken authenticatePerson(java.lang.String username)
                                        throws javax.security.auth.login.LoginException
Authenticates as a person identified by the provided userId. This method is typically used when an SSO system is in place and the SSO system has already done the necessary authentication of the user involved.
Parameters:
username - userId to authenticate with
Returns:
IdentityToken representing the authentication and that is used for client connection.
Throws:
javax.security.auth.login.LoginException - if the login fails for any reason

authenticatePersonFromCredentials

public static IdentityToken authenticatePersonFromCredentials(java.lang.String username,
                                                              java.lang.String password)
                                                       throws javax.security.auth.login.LoginException
Authenticates as a person identified by the provided userId) and password.
Parameters:
username - userId of person to authenticate with
password - password to authenticate with that should match the stored password associated with the provided userId
Returns:
IdentityToken representing the authentication and that is used for client connection.
Throws:
javax.security.auth.login.LoginException - if the login fails for any reason

synchronizeIdentityTokenWithServer

public static void synchronizeIdentityTokenWithServer(IdentityToken identityToken)
                                               throws javax.security.auth.login.LoginException,
                                                      ServerException
Resynchronizes the local copy of cached state with the server. <p/> This should be run infrequently. The typical reasons for the cached state to get out of sync with the server are: (1) the passage of time; (2) a server-side state correction occurred while the user is logged in.
Parameters:
identityToken - token that (possibly) needs updating
Throws:
ServerException
javax.security.auth.login.LoginException - if failure updating user's information

newClient

public static Client newClient(IdentityToken identityToken)
                        throws ServerException
Creates a new Client bound to the provided IdentityToken (and hence the authentication details).
Parameters:
identityToken - IdentityToken to use to represent the user that this Client will act as.
Returns:
New Client bound to the provided IdentityToken.
Throws:
ServerException - if an error occurs during server metadata retrieval.

setAlternateJndiPath

public static void setAlternateJndiPath(java.lang.String alternateJndiPath)
Sets the Server EJB's JNDI path to something other than the default, typically only used for integration reasons.
Parameters:
alternateJndiPath - new JNDI path to use to look up the Server EJB.

Skip navigation links

Oracle Role Manager Java API Reference
10g (10.1.4)
E14613-01


Copyright © 2008, 2009 Oracle. All Rights Reserved.