Skip navigation links

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

E22472-01


com.oblix.access
Class ObUserSession

java.lang.Object
  extended by com.oblix.access.ObUserSession

All Implemented Interfaces:
ObUserSessionInterface, java.lang.Cloneable

Deprecated. Implements the ObUserSession Interface

public class ObUserSession
extends java.lang.Object
implements ObUserSessionInterface, java.lang.Cloneable

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

 

Constructor Summary
ObUserSession()
          Deprecated. Default Constructor for ObUserSesion Object
ObUserSession(ObResourceRequest res, java.util.Hashtable credentials)
          Deprecated. Constructor for ObUserSession object for the specified resource and credentials
ObUserSession(ObResourceRequest res, java.util.Hashtable credentials, java.lang.String location)
          Deprecated. Constructor for ObUserSession object for the specified resource and credentials
ObUserSession(java.lang.String sessionToken)
          Deprecated. Constructor for ObUserSession object for the specified session token
ObUserSession(java.lang.String sessionToken, boolean lazyload)
          Deprecated. Constructor for ObUserSession object for the specified session token with lazy load flag

 

Method Summary
 void clearActions()
          Deprecated. Clears all information pertaining to actions that was retrieved as part of previous authentication or authorization operation.
 java.lang.Object clone()
          Deprecated. Used to clone ObUserSession Objects.
 void finalize()
          Deprecated. Cleans up native ObUserSession objects.
 java.lang.String getAction(java.lang.String actionType, java.lang.String name)
          Deprecated. Returns action corresponding to the action name and type specified.
 java.util.Hashtable getActions(java.lang.String actionType)
          Deprecated. Returns hashtable containing actions in the form of name/value pairs of String type for specified actionType.
 java.lang.String[] getActionTypes()
          Deprecated. Returns string array of all the action types returned by the OAM server as part of authentication or authorization.
 int getError()
          Deprecated. Returns the error number from the most recent authentication or authorization failure Error
 java.lang.String getErrorMessage()
          Deprecated. Returns the detailed error message for the authentication or authorization failure
 int getLastUseTime()
          Deprecated. Returns the time in seconds from Jan 1 1970 till the most recent user request was authorized.
 int getLevel()
          Deprecated. Returns the level of authentication scheme used to authenticate the user
 java.lang.String getLocation()
          Deprecated. Returns the IP address of the user's client
 int getNumberOfActions(java.lang.String actionType)
          Deprecated. Returns number of actions of the specified type that are returned by OAM server as part of authentication or authorization.
 java.lang.String getSessionToken()
          Deprecated. Returns the serialized representation of user session
 int getStartTime()
          Deprecated. Returns time in seconds from Jan 1 1970 till authenticated user session was started.
 int getStatus()
          Deprecated. Provides integer value representing the current status of the session.
 java.lang.String getUserIdentity()
          Deprecated. Returns the DN of the user's profile entry in the user directory.
 boolean isAuthorized(ObResourceRequest res)
          Deprecated. Checks if the user is authorized to request an operation for a particular resource
 boolean isAuthorized(ObResourceRequest res, java.util.Hashtable parameters)
          Deprecated. Checks if the user is authorized to request an operation for a particular resource
 void logoff()
          Deprecated. Logs off the authenticated user and terminates the session
 void setLocation(java.lang.String location)
          Deprecated. Sets the IP address of the user's client

 

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

 

Field Detail

AWAITINGLOGIN

public static final int AWAITINGLOGIN
Deprecated. 
See Also:
Constant Field Values

LOGGEDIN

public static final int LOGGEDIN
Deprecated. 
See Also:
Constant Field Values

LOGGEDOUT

public static final int LOGGEDOUT
Deprecated. 
See Also:
Constant Field Values

LOGINFAILED

public static final int LOGINFAILED
Deprecated. 
See Also:
Constant Field Values

EXPIRED

public static final int EXPIRED
Deprecated. 
See Also:
Constant Field Values

OK

public static final int OK
Deprecated. 
See Also:
Constant Field Values

ERR_UNKNOWN

public static final int ERR_UNKNOWN
Deprecated. 
See Also:
Constant Field Values

ERR_NO_USER

public static final int ERR_NO_USER
Deprecated. 
See Also:
Constant Field Values

ERR_USER_REVOKED

public static final int ERR_USER_REVOKED
Deprecated. 
See Also:
Constant Field Values

ERR_WRONG_PASSWORD

public static final int ERR_WRONG_PASSWORD
Deprecated. 
See Also:
Constant Field Values

ERR_INVALID_CERTIFICATE

public static final int ERR_INVALID_CERTIFICATE
Deprecated. 
See Also:
Constant Field Values

ERR_AUTHN_PLUGIN_DENIED

public static final int ERR_AUTHN_PLUGIN_DENIED
Deprecated. 
See Also:
Constant Field Values

ERR_INSUFFICIENT_LEVEL

public static final int ERR_INSUFFICIENT_LEVEL
Deprecated. 
See Also:
Constant Field Values

ERR_NOT_LOGGED_IN

public static final int ERR_NOT_LOGGED_IN
Deprecated. 
See Also:
Constant Field Values

ERR_SESSION_TIMEOUT

public static final int ERR_SESSION_TIMEOUT
Deprecated. 
See Also:
Constant Field Values

ERR_IDLE_TIMEOUT

public static final int ERR_IDLE_TIMEOUT
Deprecated. 
See Also:
Constant Field Values

ERR_DENY

public static final int ERR_DENY
Deprecated. 
See Also:
Constant Field Values

ERR_PASSWORD_EXPIRED

public static final int ERR_PASSWORD_EXPIRED
Deprecated. 
See Also:
Constant Field Values

ERR_PASSWORD_CHANGE_ON_RESET

public static final int ERR_PASSWORD_CHANGE_ON_RESET
Deprecated. 
See Also:
Constant Field Values

ERR_USER_LOCKED_OUT

public static final int ERR_USER_LOCKED_OUT
Deprecated. 
See Also:
Constant Field Values

ERR_NEED_MORE_DATA

public static final int ERR_NEED_MORE_DATA
Deprecated. 
See Also:
Constant Field Values

ERR_INCONCLUSIVE

public static final int ERR_INCONCLUSIVE
Deprecated. 
See Also:
Constant Field Values

Constructor Detail

ObUserSession

public ObUserSession()
              throws ObAccessException
Deprecated. 
Default Constructor for ObUserSesion Object
Throws:
ObAccessException - in case of failure to create the object

ObUserSession

public ObUserSession(java.lang.String sessionToken)
              throws ObAccessException
Deprecated. 
Constructor for ObUserSession object for the specified session token
Parameters:
sessionToken - serailized user session object representation
Throws:
ObAccessException - in case of failure to create the object or if session token is null

ObUserSession

public ObUserSession(ObResourceRequest res,
                     java.util.Hashtable credentials,
                     java.lang.String location)
              throws ObAccessException
Deprecated. 
Constructor for ObUserSession object for the specified resource and credentials
Parameters:
res - resource object for which user is being authenticated
credentials - Hashtable containing the key/value pairs of String type.
  • userid : Required for Basic and Form ObAuthenticationScheme
  • password : Required for Basic and Form ObAuthenticationScheme
    In case of Form AuthenticationScheme username and password are challenge parameters of AuthenticationScheme.
    For Basic AuthenticationScheme username and password are "userid" and "password"
  • certificate : Required for Certificate ObAuthenticationScheme. The value for this certificate key should be Base64 Encoded string which represent a valid X.509 certificate.
  • ip (Optional) : IP address, in dotted notation, of the client accessing the resource
  • operation (Optional) : Operation attempted on the resource. For HTTP resources, one of GET,POST,PUT,HEAD,DELETE, TRACE,OPTIONS,CONNECT,OTHER.
  • resource (Optional) : The requested resource identifier. For HTTP resources, the full URL.
  • targethost (Optional) : The host (host:port) to which resource request is sent.
    One or more of the optional parameters above may be required by certain authentication schemes, modules, or plugins as configured in the OAM server. Refer to your OAM server configuration and documentation to determine which parameters to supply.
location - used if the client location needs to be specified. Valid DNS name or IP address can be used to specify the location
Throws:
ObAccessException - in case of failure to create the object, or in case resource object is null

ObUserSession

public ObUserSession(ObResourceRequest res,
                     java.util.Hashtable credentials)
              throws ObAccessException
Deprecated. 
Constructor for ObUserSession object for the specified resource and credentials
Parameters:
res - resource object for which user is being authenticated
credentials - Hashtable containing the key/value pairs of String type.
  • userid : Required for Basic and Form ObAuthenticationScheme
  • password : Required for Basic and Form ObAuthenticationScheme
    In case of Form AuthenticationScheme username and password are challenge parameters of AuthenticationScheme.
    For Basic AuthenticationScheme username and password are "userid" and "password"
  • certificate : Required for Certificate ObAuthenticationScheme. The value for this certificate key should be Base64 Encoded string which represent a valid X.509 certificate.
  • ip (Optional) : IP address, in dotted notation, of the client accessing the resource
  • operation (Optional) : Operation attempted on the resource. For HTTP resources, one of GET,POST,PUT,HEAD,DELETE, TRACE,OPTIONS,CONNECT,OTHER.
  • resource (Optional) : The requested resource identifier. For HTTP resources, the full URL.
  • targethost (Optional) : The host (host:port) to which resource request is sent.
    One or more of the optional parameters above may be required by certain authentication schemes, modules, or plugins as configured in the OAM server. Refer to your OAM server configuration and documentation to determine which parameters to supply.
Throws:
ObAccessException - in case of failure to create the object or if resource object is invalid

ObUserSession

public ObUserSession(java.lang.String sessionToken,
                     boolean lazyload)
              throws ObAccessException
Deprecated. 
Constructor for ObUserSession object for the specified session token with lazy load flag
Parameters:
sessionToken - serailized user session object representation, bool flag to indicte lazy load of sessioninfo
Throws:
ObAccessException - in case of failure to create the object or if session token is null

Method Detail

getUserIdentity

public java.lang.String getUserIdentity()
                                 throws ObAccessException
Deprecated. 
Description copied from interface: ObUserSessionInterface
Returns the DN of the user's profile entry in the user directory.
Specified by:
getUserIdentity in interface ObUserSessionInterface
Returns:
DN of the user's profile entry
Throws:
ObAccessException - If error occurs during operation

getLevel

public int getLevel()
             throws ObAccessException
Deprecated. 
Description copied from interface: ObUserSessionInterface
Returns the level of authentication scheme used to authenticate the user
Specified by:
getLevel in interface ObUserSessionInterface
Returns:
Authentication scheme level
Throws:
ObAccessException - If error occurs during operation

getLocation

public java.lang.String getLocation()
                             throws ObAccessException
Deprecated. 
Description copied from interface: ObUserSessionInterface
Returns the IP address of the user's client
Specified by:
getLocation in interface ObUserSessionInterface
Returns:
IP address of the user's client
Throws:
ObAccessException - If error occurs during operation

setLocation

public void setLocation(java.lang.String location)
Deprecated. 
Description copied from interface: ObUserSessionInterface
Sets the IP address of the user's client
Specified by:
setLocation in interface ObUserSessionInterface
Throws:
ObAccessRuntimeException - in case if fails to validate Ip address

getStartTime

public int getStartTime()
                 throws ObAccessException
Deprecated. 
Description copied from interface: ObUserSessionInterface
Returns time in seconds from Jan 1 1970 till authenticated user session was started. This value is used to determine when a session expires.
Specified by:
getStartTime in interface ObUserSessionInterface
Returns:
Time in seconds from Jan 1 1970 till authenticated user session was started.
Throws:
ObAccessException - If failed to retrieve session information

getLastUseTime

public int getLastUseTime()
                   throws ObAccessException
Deprecated. 
Description copied from interface: ObUserSessionInterface
Returns the time in seconds from Jan 1 1970 till the most recent user request was authorized. This value is used to determine when an idle session expires.
Specified by:
getLastUseTime in interface ObUserSessionInterface
Returns:
Time in seconds from Jan 1 1970 till the most recent user request was authorized.
Throws:
ObAccessException - In case if operation fails.

getNumberOfActions

public int getNumberOfActions(java.lang.String actionType)
Deprecated. 
Description copied from interface: ObUserSessionInterface
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.

Specified by:
getNumberOfActions in interface ObUserSessionInterface
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

getActions

public java.util.Hashtable getActions(java.lang.String actionType)
Deprecated. 
Description copied from interface: ObUserSessionInterface
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".

Specified by:
getActions in interface ObUserSessionInterface
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.

getAction

public java.lang.String getAction(java.lang.String actionType,
                                  java.lang.String name)
Deprecated. 
Description copied from interface: ObUserSessionInterface
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".

Specified by:
getAction in interface ObUserSessionInterface
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.

getActionTypes

public java.lang.String[] getActionTypes()
Deprecated. 
Description copied from interface: ObUserSessionInterface
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.

Specified by:
getActionTypes in interface ObUserSessionInterface
Returns:
String array of all the action types returned by the OAM server as part of authentication or authorization.

clearActions

public void clearActions()
Deprecated. 
Description copied from interface: ObUserSessionInterface
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.
Specified by:
clearActions in interface ObUserSessionInterface

getStatus

public int getStatus()
Deprecated. 
Description copied from interface: ObUserSessionInterface
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.
Specified by:
getStatus in interface ObUserSessionInterface
Returns:
Status information of this user session
Throws:
ObAccessRuntimeException - in case if it fails to create user session

getError

public int getError()
Deprecated. 
Description copied from interface: ObUserSessionInterface
Returns the error number from the most recent authentication or authorization failure Error
Specified by:
getError in interface ObUserSessionInterface
Returns:
Error number for error condition.

getErrorMessage

public java.lang.String getErrorMessage()
Deprecated. 
Description copied from interface: ObUserSessionInterface
Returns the detailed error message for the authentication or authorization failure
Specified by:
getErrorMessage in interface ObUserSessionInterface
Returns:
Error message describing error condition.

isAuthorized

public boolean isAuthorized(ObResourceRequest res)
                     throws ObAccessException
Deprecated. 
Description copied from interface: ObUserSessionInterface
Checks if the user is authorized to request an operation for a particular resource
Specified by:
isAuthorized in interface ObUserSessionInterface
Parameters:
res - resource object being checked for authorization
Returns:
Boolean true if authorization succeeds.
Throws:
ObAccessException - In case a failure occurs during the operation

isAuthorized

public boolean isAuthorized(ObResourceRequest res,
                            java.util.Hashtable parameters)
                     throws ObAccessException
Deprecated. 
Description copied from interface: ObUserSessionInterface
Checks if the user is authorized to request an operation for a particular resource
Specified by:
isAuthorized in interface ObUserSessionInterface
Parameters:
res - resource object being checked for authorization
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 ObResourceRequest
Returns:
Boolean true if authorization succeeds.
Throws:
ObAccessException - In case a failure occurs during the operation

getSessionToken

public java.lang.String getSessionToken()
Deprecated. 
Description copied from interface: ObUserSessionInterface
Returns the serialized representation of user session
Specified by:
getSessionToken in interface ObUserSessionInterface
Returns:
String representing user session.
Throws:
ObAccessRuntimeException - in case if it fails to generate the session token.

logoff

public void logoff()
Deprecated. 
Description copied from interface: ObUserSessionInterface
Logs off the authenticated user and terminates the session
Specified by:
logoff in interface ObUserSessionInterface
Throws:
ObAccessRuntimeException - in case if it fails to perform logout for authenticated user.

finalize

public void finalize()
Deprecated. 
Description copied from interface: ObUserSessionInterface
Cleans up native ObUserSession objects. It is recommended that applications using Access Server API use finalize() methods for the resources that are no longer in use, instead of relying on Java Garbage Collection.
Specified by:
finalize in interface ObUserSessionInterface
Overrides:
finalize in class java.lang.Object

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Deprecated. 
Used to clone ObUserSession Objects. When using this function care must be taken to use finalize() for cleaning up any unused old references
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

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.