Skip navigation links

Oracle Access Manager Access SDK Java API Reference
11g Release 1 (11.1.1)

E22472-01


oracle.security.am.asdk
Class BaseUserSession

java.lang.Object
  extended by oracle.security.am.asdk.BaseUserSession

Direct Known Subclasses:
PseudoUserSession, UserSession

public abstract class BaseUserSession
extends java.lang.Object

BaseUserSession class implements APIs common to UserSession and PseudoUserSession. BaseUserSession is internal to the implementation of this asdk and should not be used or extended by the end application.


Field Summary
static int AWAITINGLOGIN
           
static int ERR_AUTHN_PLUGIN_DENIED
           
static int ERR_DENY
           
static int ERR_IDLE_TIMEOUT
           
static int ERR_INCONCLUSIVE
           
static int ERR_INSUFFICIENT_LEVEL
           
static int ERR_INVALID_CERTIFICATE
           
static int ERR_MOD_USER_FAILED
           
static int ERR_NEED_MORE_DATA
           
static int ERR_NO_USER
           
static int ERR_NOT_LOGGED_IN
           
static int ERR_PASSWORD_CHANGE_ON_RESET
           
static int ERR_PASSWORD_EXPIRED
           
static int ERR_SESSION_TIMEOUT
           
static int ERR_UNKNOWN
           
static int ERR_USER_LOCKED_OUT
           
static int ERR_USER_REVOKED
           
static int ERR_WRONG_PASSWORD
           
static int EXPIRED
           
static java.lang.String LOGGED_OUT_SESSION_TOKEN
           
static int LOGGEDIN
           
static int LOGGEDOUT
           
static int LOGINFAILED
           
static int OK
           

 

Method Summary
 void clearActions()
          Clears all information pertaining to actions that was retrieved as part of previous authentication or authorization operation.
 java.lang.String getAction(java.lang.String actionType, java.lang.String name)
          Returns action corresponding to the action name and type specified.
 java.util.Hashtable getActions(java.lang.String actionType)
          Returns hashtable containing actions in the form of name/value pairs of String type for specified actionType.
 java.lang.String[] getActionTypes()
          Returns string array of all the action types returned by the OAM server as part of authentication or authorization.
 int getError()
          Returns error number determined by the most recent authentication or authorization.
 java.lang.String getErrorMessage()
          Returns detailed error message pertaining to authentication or authorization failure.
 int getLevel()
          Returns value representing the authentication scheme level used to authenticate the user.
 java.lang.String getLocation()
          Returns the IP address of the client as specified by the application while creating the session.
 int getNumberOfActions(java.lang.String actionType)
          Returns number of actions of the specified type that are returned by OAM server as part of authentication or authorization.
 int getStatus()
          Provides integer value representing the current status of the session.
 java.lang.String getUserIdentity()
          Returns the DN of the user's profile entry in the user directory.
 boolean isAuthorized(ResourceRequest res)
          To check whether the user is authorized to access the resource
 boolean isAuthorized(ResourceRequest res, java.util.Hashtable parameters)
          To check whether the user is authorized to access the resource
 void setLocation(java.lang.String sLocation)
          Sets the IP address of the client as provided by the application.

 

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

 

Field Detail

OK

public static final int OK
See Also:
Constant Field Values

ERR_UNKNOWN

public static final int ERR_UNKNOWN
See Also:
Constant Field Values

ERR_NO_USER

public static final int ERR_NO_USER
See Also:
Constant Field Values

ERR_USER_REVOKED

public static final int ERR_USER_REVOKED
See Also:
Constant Field Values

ERR_WRONG_PASSWORD

public static final int ERR_WRONG_PASSWORD
See Also:
Constant Field Values

ERR_INVALID_CERTIFICATE

public static final int ERR_INVALID_CERTIFICATE
See Also:
Constant Field Values

ERR_AUTHN_PLUGIN_DENIED

public static final int ERR_AUTHN_PLUGIN_DENIED
See Also:
Constant Field Values

ERR_INSUFFICIENT_LEVEL

public static final int ERR_INSUFFICIENT_LEVEL
See Also:
Constant Field Values

ERR_NOT_LOGGED_IN

public static final int ERR_NOT_LOGGED_IN
See Also:
Constant Field Values

ERR_SESSION_TIMEOUT

public static final int ERR_SESSION_TIMEOUT
See Also:
Constant Field Values

ERR_IDLE_TIMEOUT

public static final int ERR_IDLE_TIMEOUT
See Also:
Constant Field Values

ERR_DENY

public static final int ERR_DENY
See Also:
Constant Field Values

ERR_PASSWORD_EXPIRED

public static final int ERR_PASSWORD_EXPIRED
See Also:
Constant Field Values

ERR_PASSWORD_CHANGE_ON_RESET

public static final int ERR_PASSWORD_CHANGE_ON_RESET
See Also:
Constant Field Values

ERR_USER_LOCKED_OUT

public static final int ERR_USER_LOCKED_OUT
See Also:
Constant Field Values

ERR_NEED_MORE_DATA

public static final int ERR_NEED_MORE_DATA
See Also:
Constant Field Values

ERR_INCONCLUSIVE

public static final int ERR_INCONCLUSIVE
See Also:
Constant Field Values

ERR_MOD_USER_FAILED

public static final int ERR_MOD_USER_FAILED
See Also:
Constant Field Values

AWAITINGLOGIN

public static final int AWAITINGLOGIN
See Also:
Constant Field Values

LOGGEDIN

public static final int LOGGEDIN
See Also:
Constant Field Values

LOGGEDOUT

public static final int LOGGEDOUT
See Also:
Constant Field Values

LOGINFAILED

public static final int LOGINFAILED
See Also:
Constant Field Values

EXPIRED

public static final int EXPIRED
See Also:
Constant Field Values

LOGGED_OUT_SESSION_TOKEN

public static final java.lang.String LOGGED_OUT_SESSION_TOKEN
See Also:
Constant Field Values

Method Detail

getLevel

public int getLevel()
             throws AccessException
Returns value representing the authentication scheme level used to authenticate the user.
Returns:
Authentication scheme level
Throws:
AccessException - If error occurs during operation

getUserIdentity

public java.lang.String getUserIdentity()
                                 throws AccessException
Returns the DN of the user's profile entry in the user directory.
Returns:
DN of the user's profile entry
Throws:
AccessException - If error occurs during operation

getLocation

public java.lang.String getLocation()
                             throws AccessException
Returns the IP address of the client as specified by the application while creating the session.
Returns:
IP address of the client
Throws:
AccessException - If error occurs during operation

getAction

public java.lang.String getAction(java.lang.String actionType,
                                  java.lang.String name)
Returns action corresponding to the action name and type specified. The actions are the responses that OAM server returns after authentication and authorization. The actions that are returned during authentication or authorization depends on policies configured in the OAM server.

Each resource type defines the following set of action types: cookie, headervar and redirecturl for http resources. The redirecturl action type indicates the url where the user should be redirected to for successful or failed authentication or authorization. To retrieve the redirection url set action type to "redirecturl" and name to "HTTP_REDIRECT".

Parameters:
actionType - type of action to be retrieved. If this is left NULL, the default is headervar.
name - name of the action to be retrieved.
Returns:
Action corresponding to the action name and type specified.

getActions

public java.util.Hashtable getActions(java.lang.String actionType)
Returns hashtable containing actions in the form of name/value pairs of String type for specified actionType. The actions are the responses that OAM server returns after authentication and authorization. The actions that are returned during authentication or authorization depends on policies configured in the OAM server.

Each resource type defines the following set of action types: cookie, headervar and redirecturl for http resources. The redirecturl action type indicates the url where the user should be redirected to for successful or failed authentication or authorization. To retrieve the redirection url set action type to "redirecturl".

Parameters:
actionType - type of action to be retrieved. If this is left NULL, the default is "headervar".
Returns:
Hashtable containing actions in the form of name/value pairs of String type.

getNumberOfActions

public int getNumberOfActions(java.lang.String actionType)
Returns number of actions of the specified type that are returned by OAM server as part of authentication or authorization. The actions are the responses that OAM server returns after authentication and authorization. The actions that are returned during authentication or authorization depends on policies configured in the OAM server.

Each resource type defines the following set of action types: cookie, headervar and redirecturl for http resources.

Parameters:
actionType - type of action to be retrieved. If this is left NULL, the default is headervar.
Returns:
Number of actions of the specified type that are associated with the specified user session.

getActionTypes

public java.lang.String[] getActionTypes()
Returns string array of all the action types returned by the OAM server as part of authentication or authorization. The actions are the responses that OAM server returns after authentication and authorization. The actions that are returned during authentication or authorization depends on policies configured in the OAM server.

Each resource type defines the following set of action types: cookie, headervar and redirecturl for http resources.

Returns:
String array of all the action types returned by the OAM server as part of authentication or authorization.

clearActions

public void clearActions()
Clears all information pertaining to actions that was retrieved as part of previous authentication or authorization operation. The actions are the responses that OAM server returns after authentication and authorization. The actions that are returned during authentication or authorization depends on policies configured in the OAM server.

getStatus

public int getStatus()
              throws AccessException
Provides integer value representing the current status of the session. The return value of this function can be checked against below constants exposed by this class.
Returns:
Status information of this user session
Throws:
AccessException - If error occurs during operation

getError

public int getError()
Returns error number determined by the most recent authentication or authorization. Error
Returns:
Error number for error condition

getErrorMessage

public java.lang.String getErrorMessage()
Returns detailed error message pertaining to authentication or authorization failure. The text of this message is derived by the AccessClient and is not intended to be changed by the user.
Returns:
Error message describing error condition

isAuthorized

public boolean isAuthorized(ResourceRequest res,
                            java.util.Hashtable parameters)
                     throws AccessException
To check whether the user is authorized to access the resource
Parameters:
res - object representing a requested resource whose authorization is to be checked.
parameters - Hashtable of name-value pairs of String type required by These parameters are required if the authorization policy requires additional information to perform authorization. The parameters that are required for authorization can be obtained by using getAuthorizationParameters method of ResourceRequest
Returns:
Boolean true if the user is authorized to request an operation for a particular resource else returns false
Throws:
AccessException - In case a failure occurs during the operation

isAuthorized

public boolean isAuthorized(ResourceRequest res)
                     throws AccessException
To check whether the user is authorized to access the resource
Parameters:
res - object representing a requested resource whose authorization is to be checked.
Returns:
Boolean true if the user is authorized to request an operation for a particular resource else returns false
Throws:
AccessException - In case a failure occurs during the operation

setLocation

public void setLocation(java.lang.String sLocation)
                 throws AccessException
Sets the IP address of the client as provided by the application.
Parameters:
sLocation - IP address of the client
Throws:
AccessException - In case if it fails to validate Ip address

Skip navigation links

Oracle Access Manager Access SDK Java API Reference
11g Release 1 (11.1.1)

E22472-01


Copyright © 2000,2011, Oracle® and/or its affiliates. All rights reserved.