Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 1 (11.1.1.5.0)

E10686-06


oracle.adf.share.security.providers.jps
Class JpsUtil

java.lang.Object
  extended by oracle.adf.share.security.providers.jps.JpsUtil


public class JpsUtil
extends java.lang.Object

Internal: Applications should not use this class.


Constructor Summary
JpsUtil()
           

 

Method Summary
static java.lang.String getApplicationName()
          Deprecated. Deprecated since 11.1.1.1.0 Internal: Applications should not use this method.
static java.lang.String getCurrentUserUniqueID()
          Returns the unique username of the currently logged on user or the string '[null]' if not running in a security context.
static oracle.security.idm.IdentityStore getDefaultIdentityStore()
          Get default idenity store based on JPS service context available via app-level or system-level jps-config.xml
static javax.security.auth.login.LoginContext getLoginContext(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler cb)
          Internal: Applications should not use this method.
static java.lang.String getUserUniqueIdentifier(java.security.Principal principal)
          Get unique identifier for the given principal.
static java.lang.String getUserUniqueIdentifier(java.lang.String userName)
          Get unique identifier for the given user.

 

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

 

Constructor Detail

JpsUtil

public JpsUtil()

Method Detail

getApplicationName

public static java.lang.String getApplicationName()
Deprecated. Deprecated since 11.1.1.1.0 Internal: Applications should not use this method.

getLoginContext

public static javax.security.auth.login.LoginContext getLoginContext(javax.security.auth.Subject subject,
                                                                     javax.security.auth.callback.CallbackHandler cb)
Internal: Applications should not use this method.

getCurrentUserUniqueID

public static final java.lang.String getCurrentUserUniqueID()
Returns the unique username of the currently logged on user or the string '[null]' if not running in a security context. The username returned will be the user GUID if available or the standard user name if not. This API should be used in preference to ADFContext.getSecurityContext().getUserName() as it should provide a unique user in multi-domain environments whereas the ADFContext API doesn't necessarily do so.
Returns:
a unique identifier representing the current user or the string [null] if outside of a security context
  1. If the user is anonymous, returns anonymous user as defined by JPS.
  2. If no security context exists, return anonymous user as defined by JPS.
See Also:
getUserUniqueIdentifier(java.security.Principal)

getUserUniqueIdentifier

public static java.lang.String getUserUniqueIdentifier(java.security.Principal principal)
Get unique identifier for the given principal.
Parameters:
userprincipal -
Returns:
a unique identifier representing the given principal
  1. If the principal passed is null, then this API will return 'anonymous'. If guid does not exist in the identity store, principal name is returned.
Throws:
java.lang.RuntimeException - if the underlying Id Store configuration ended up with some error and user attributes could not be retrieved.

getUserUniqueIdentifier

public static java.lang.String getUserUniqueIdentifier(java.lang.String userName)
Get unique identifier for the given user.
Parameters:
String - user name
Returns:
a unique identifier representing the given username
  1. If the username passed is null, then 'anonymous' is returned. If guid does not exist in the identity store, user name is returned.
Throws:
java.lang.RuntimeException - if the underlying Id Store configuration ended up with some error and user attributes could not be retrieved.

getDefaultIdentityStore

public static oracle.security.idm.IdentityStore getDefaultIdentityStore()
                                                                 throws oracle.security.jps.JpsException
Get default idenity store based on JPS service context available via app-level or system-level jps-config.xml
Returns:
IdentityStore
Throws:
oracle.security.jps.JpsException

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 1 (11.1.1.5.0)

E10686-06


Copyright © 1997, 2011, Oracle. All rights reserved.