Overview | Package | Class | Tree | Deprecated | Index | Help
| OracleAS PDK for Java 9.0.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.portal.provider.v2
Class ProviderUser

    java.lang.Object
      |
      +--oracle.webdb.utils.BaseUser
            |
            +--oracle.portal.provider.v2.ProviderUser

All Implemented Interfaces:
  java.security.Principal, oracle.security.jazn.realm.RealmPrincipal, oracle.security.jazn.realm.RealmUser

Direct Known Subclasses:
  ServletProviderUser

public abstract class ProviderUser
extends oracle.webdb.utils.BaseUser

Represents the Portal user. Additionally provides the methods for establishing and reaquiring the user's session.

Some Providers have a distinct notion users. Providers are able to configure the Portal (using a login server) to map between the Portal user and the application (Provider) user. The ProviderUser interface provides access to both the Portal user information and this mapped information.

The portal runs in a default public mode. This occurs when a user accesses the portal without logging in. This is represented by a special ProviderUser whose portal user name is defined by the String ProviderUser.PUBLIC. The convenience method isPublicUser() is provided to simplify this check.

Field Summary
`static int` | `AUTH_LEVEL_NOT_DETERMINED` Authentication level has not yet been determined.
`static int` | `AUTH_LEVEL_NOT_SUPPORTED` JPDK is running against a version of portal that does not support authentication level
`static java.lang.String` | `DEFAULT_SUBSCRIBER_NAME` Name used for default portal user's realm, implied when no specific realm information is sent by portal.
`static int` | `NOT_AUTHENTICATED` User is not logged on and does not have a persistent cookie
`static java.lang.String` | `PORTAL_PUBLIC` Constant (string) representing the public user.
`static java.lang.String` | `PUBLIC` Constant (string) representing the public user.
`static int` | `PUBLIC_STRONG_AUTH` User has logged into the portal, using the user id PUBLIC, and been authenticated by the login server within the current session.
`static java.lang.String` | `PUBLIC_USERNAME` Constant (string) representing the public user.
`static int` | `PUBLIC_WEAK_AUTH` User is not logged on.
`static int` | `USER_STRONG_AUTH` User has logged into the portal, using a user id other than PUBLIC, and been authenticated by the login server within the current session.
`static int` | `USER_WEAK_AUTH` User is not logged on.

Constructor Summary
`ProviderUser()`

Method Summary
`abstract int` | `getAuthenticationLevel()` Gets the authentication level for the user.
`abstract java.lang.String` | `getEmail()` Get the portal user's email address.
`abstract java.lang.String` | `getFirstName()` Get the portal user's first name.
`abstract java.lang.String` | `getLastName()` Get the portal user's last name.
`abstract UserLocation` | `getLocation()` Gets the user's location.
`abstract java.util.Calendar` | `getLoginTime()` Gets the time when this user logged into the Portal.
`abstract java.lang.String` | `getMappedName()` Gets the external application username that is mapped to this portal user.
`abstract java.lang.String` | `getName()` Gets the name of the portal user represented by this object.
`abstract PortalRealm` | `getPortalRealm()` Get the portal user's realm.
`abstract java.lang.String` | `getPortalSessionId()` Gets the Portal session ID for this user.
`abstract java.lang.String` | `getPropertyValue(java.lang.String propertyName)` Get a named property value of the user as stored in OID.
`abstract ProviderSubscription` | `getProviderSubscription()` Gets subscription information related to this user/request Note, the subscription information is specific to the ProviderInstance the current request was received for.
`java.lang.String` | `getProviderSubscriptionKey()` Gets the subscription key from the ProviderSubscription.
`java.lang.String` | `getQualifiedName()` Gets the qualified username, ie username appended with company name separated by "@@".
`abstract oracle.security.jazn.realm.Realm` | `getRealm()` Get the portal user's realm.
`abstract ProviderSession` | `getSession()` Used to create and/or reacquire the user session.
`abstract ProviderSession` | `getSession(boolean create)` Used to create and/or reacquire the user session.
`abstract java.lang.String` | `getSubscriberDN()` Get the portal user's Subscription distinguished name.
`abstract java.lang.String` | `getSubscriberGUID()` Get the portal user's subscriber GUID.
`abstract java.lang.String` | `getSubscriberName()` Get the portal user's subscriber name.
`abstract java.lang.String` | `getUserDN()` Get the portal user's distinguished name.
`abstract java.lang.String` | `getUserGUID()` Get the portal user's GUID.
`abstract boolean` | `isLDAPEnabled()` Determine if the OidManager is configured.
`boolean` | `isLoggedOn()` Indicates if the user has logged onto the portal in the current session (true).
`boolean` | `isPublicUser()` Indicates if this request is from a public user, i.e.
`abstract boolean` | `isUserInGroup(java.lang.String groupName)` check if this user is a member of a group.
`boolean` | `isWeaklyAuthenticated()` Indicates if the current user is at least weakly authenticated.

Methods inherited from class oracle.webdb.utils.BaseUser
`equals, getDescription, getDisplayName, getFullName, hashCode, setDescription, toString`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### PUBLIC

    public static final java.lang.String PUBLIC

  Constant (string) representing the public user. That is the "user" when a request is made and the person hasn't logged in.

  See Also:
    Constant Field Values

### PORTAL_PUBLIC

    public static final java.lang.String PORTAL_PUBLIC

  Constant (string) representing the public user. That is the "user" when a request is made and the person hasn't logged in.

  See Also:
    Constant Field Values

### PUBLIC_USERNAME

    public static final java.lang.String PUBLIC_USERNAME

  Constant (string) representing the public user. That is the "user" when a request is made and the person hasn't logged in.

  See Also:
    Constant Field Values

### DEFAULT_SUBSCRIBER_NAME

    public static final java.lang.String DEFAULT_SUBSCRIBER_NAME

  Name used for default portal user's realm, implied when no specific realm information is sent by portal.

  See Also:
    Constant Field Values

### AUTH_LEVEL_NOT_DETERMINED

    public static final int AUTH_LEVEL_NOT_DETERMINED

  Authentication level has not yet been determined.

  See Also:
    Constant Field Values

### AUTH_LEVEL_NOT_SUPPORTED

    public static final int AUTH_LEVEL_NOT_SUPPORTED

  JPDK is running against a version of portal that does not support authentication level

  See Also:
    Constant Field Values

### NOT_AUTHENTICATED

    public static final int NOT_AUTHENTICATED

  User is not logged on and does not have a persistent cookie

  See Also:
    Constant Field Values

### PUBLIC_WEAK_AUTH

    public static final int PUBLIC_WEAK_AUTH

  User is not logged on. Weakly authenticated as a PUBLIC portal user using persistent cookie.

  See Also:
    Constant Field Values

### USER_WEAK_AUTH

    public static final int USER_WEAK_AUTH

  User is not logged on. Weakly authenticated as a portal user (any user other than PUBLIC) using persistent cookie.

  See Also:
    Constant Field Values

### PUBLIC_STRONG_AUTH

    public static final int PUBLIC_STRONG_AUTH

  User has logged into the portal, using the user id PUBLIC, and been authenticated by the login server within the current session.

  See Also:
    Constant Field Values

### USER_STRONG_AUTH

    public static final int USER_STRONG_AUTH

  User has logged into the portal, using a user id other than PUBLIC, and been authenticated by the login server within the current session.

  See Also:
    Constant Field Values

Constructor Detail

### ProviderUser

    public ProviderUser()

Method Detail

### getName

    public abstract java.lang.String getName()

  Gets the name of the portal user represented by this object.

  Specified by:
    `getName` in interface `java.security.Principal`
  Specified by:
    `getName` in class `oracle.webdb.utils.BaseUser`
  Returns:
    the portal user name.

### getMappedName

    public abstract java.lang.String getMappedName()

  Gets the external application username that is mapped to this portal user.

  Returns:
    the mapped application user. null if there is no mapped user.

### getProviderSubscription

    public abstract ProviderSubscription getProviderSubscription()

  Gets subscription information related to this user/request Note, the subscription information is specific to the ProviderInstance the current request was received for.

  Returns:
    ProviderSubscription object representing the subscription info or null if there is no subscription info.

### getProviderSubscriptionKey

    public java.lang.String getProviderSubscriptionKey()

  Gets the subscription key from the ProviderSubscription. Convenience method for getProviderSubscription().getSubscriptionKey().

  Returns:
    the subscription key.

### getRealm

    public abstract oracle.security.jazn.realm.Realm getRealm()

  Get the portal user's realm. This method returns the generic Realm, defined by `Realm`, for the user.

  Specified by:
    `getRealm` in interface `oracle.security.jazn.realm.RealmPrincipal`
  Specified by:
    `getRealm` in class `oracle.webdb.utils.BaseUser`
  Returns:
    the portal user's realm.

### getPortalRealm

    public abstract PortalRealm getPortalRealm()

  Get the portal user's realm. This method returns the Provider framework specific `PortalRealm` implementation.

### getQualifiedName

    public java.lang.String getQualifiedName()

  Gets the qualified username, ie username appended with company name separated by "@@".

  Returns:
    the qualified username.

### getLoginTime

    public abstract java.util.Calendar getLoginTime()

  Gets the time when this user logged into the Portal.

  Returns:
    the login time.

### getLocation

    public abstract UserLocation getLocation()

  Gets the user's location. Value is allowed to be `null`, which means the information is not available.

  Returns:
    a `UserLocation` object representing the user's location.

### getPortalSessionId

    public abstract java.lang.String getPortalSessionId()

  Gets the Portal session ID for this user. Portlet developers can use this ID to map to their in memory "session" state vs. using a cookie based mechanism. The benefit is performance. If the provider doesn't use cookies the portal can communicate more efficiently with it.

  Returns:
    the Portal session ID for this user.

### getAuthenticationLevel

    public abstract int getAuthenticationLevel()

  Gets the authentication level for the user.

  Returns:
    the authentication level.

### isLoggedOn

    public boolean isLoggedOn()

  Indicates if the user has logged onto the portal in the current session (true). A user who is weakly authentication has not logged on to the portal in the current session so this method will return false.

  Returns:
    `true` if the user has logged onto the portal, `false` otherwise.

### isWeaklyAuthenticated

    public boolean isWeaklyAuthenticated()

  Indicates if the current user is at least weakly authenticated.

  Returns:
    `true` if the current user is at least weakly authenticated, `false` otherwise.

### isPublicUser

    public boolean isPublicUser()

  Indicates if this request is from a public user, i.e. the user has not logged in and is not weakly authenticated based on a prior login.

  Returns:
    `true` if the user is accessing the portal in public mode, `false` otherwise.

### getSession

    public abstract ProviderSession getSession(boolean create)
                                        throws java.lang.IllegalStateException

  Used to create and/or reacquire the user session. If running as a Servlet and sessions are maintained via cookies then the sessions must only be created in Provider.initSession().

  Note: this method can throw an llegalStateException. This occurs if the user object has become stale. I.e. no longer contains the state that it needs to acquire/create the session.

  As all Provider/Portlet APIs give you access to the User object per request you should not (need to) retain the user object via reference in cross-request object (like the session itself). This only leads to possibilities of memory leaks.

  Parameters:
    `create` - if true then a session is created for the user if it doesn't currently exist.
  Returns:
    the session object for this user. null if create is false and the session doesn't already exist.
    `java.lang.IllegalStateException`

### getSession

    public abstract ProviderSession getSession()
                                        throws java.lang.IllegalStateException

  Used to create and/or reacquire the user session. Always creates a session if it doesn't currently exist. The same as calling getSession(true).

  If running as a Servlet and sessions are maintained via cookies then the sessions must only be created in Provider.initSession().

  Note: this method can throw an llegalStateException. This occurs if the user object has become stale. I.e. no longer contains the state that it needs to acquire/create the session.

  As all Provider/Portlet APIs give you access to the User object per request you should not (need to) retain the user object via reference in cross-request object (like the session itself). This only leads to possibilities of memory leaks.

  Returns:
    the session object for this user.
    `java.lang.IllegalStateException`

### getUserDN

    public abstract java.lang.String getUserDN()

  Get the portal user's distinguished name. This method returns the users distinguished name as stored in OID.

  Returns:
    the portal user's distinguished name.

### getSubscriberDN

    public abstract java.lang.String getSubscriberDN()

  Get the portal user's Subscription distinguished name. This method returns the user's subscriber distinguished name as stored in OID.

  Returns:
    the portal user's subscriber distinguished name.

### getUserGUID

    public abstract java.lang.String getUserGUID()

  Get the portal user's GUID. This method returns the user's GUID as stored in OID.

  Returns:
    the portal user's GUID.

### getSubscriberGUID

    public abstract java.lang.String getSubscriberGUID()

  Get the portal user's subscriber GUID. This method returns the user's Subscriber GUID as stored in OID.

  Returns:
    the portal user's subscriber GUID.

### getSubscriberName

    public abstract java.lang.String getSubscriberName()

  Get the portal user's subscriber name. This method returns the user's Subscriber name as stored in OID.

  Returns:
    the portal user's subscriber GUID.

### getFirstName

    public abstract java.lang.String getFirstName()

  Get the portal user's first name. This method returns the user's first name as stored in OID.

  Returns:
    the portal user's first name.

### getLastName

    public abstract java.lang.String getLastName()

  Get the portal user's last name. This method returns the user's last name as stored in OID.

  Returns:
    the portal user's last name.

### getEmail

    public abstract java.lang.String getEmail()

  Get the portal user's email address. This method returns the user's email address as stored in OID.

  Returns:
    the portal user's email address.

### getPropertyValue

    public abstract java.lang.String getPropertyValue(java.lang.String propertyName)

  Get a named property value of the user as stored in OID. Any property associated with the user can be queried that is stored in the OID user repository. Use the Oracle Directory Manager tool to find out all the properties available. Some of the commonly used property names are defined in OidManager class

  Returns:
    the portal user's named property.

### isUserInGroup

    public abstract boolean isUserInGroup(java.lang.String groupName)

  check if this user is a member of a group. The users, groups and group membership are stored in OID

  Returns:
    the whether or not this user is a member of the named group

### isLDAPEnabled

    public abstract boolean isLDAPEnabled()

  Determine if the OidManager is configured. This is needed because the methods return null if there is no Oid Manager or there is no data this method enables the caller to determine the reason why null was returned

  Returns:
    whether the oid manager is configured.

Overview | Package | Class | Tree | Deprecated | Index | Help
| OracleAS PDK for Java 9.0.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2002,2003 Oracle Corporation. All Rights Reserved.