|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal 11g Release 1 (11.1.1.8.0) E15995-07 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.webcenter.security.common.WCSecurityUtility
public final class WCSecurityUtility
This class contains all public utility APIs related to WebCenter Security.
Method Summary | |
---|---|
static java.lang.String |
getCurrentImpersonatorId() Get the user identifier of the impersonator if the current user is in an impersonation session |
static IdentityStore |
getDefaultIdentityStore() Gets the default identity store configured |
static User |
getUserFromUserName(java.lang.String username) Gets the user object given the user name |
static boolean |
isImpersonationConfigured() Checks if impersonation feature is configured for the system |
static boolean |
isServiceConfigured(java.lang.String serviceId) In this API, we check whether the given service is configured or not |
static java.lang.String |
issueTrustServiceSecurityToken() Issues a security token that any WebCenter or Web 2.0 Client can pass in its request header to the REST Service for securely propagating the user identity. |
static boolean |
isUserInImpersonationSession() Checks if the current user is in an impersonation session |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String issueTrustServiceSecurityToken()
This API is intended for use in service to service authentication and identity propagation. The endpoint must be configured with the Trust Service Identity Asserter to establish the security context using the user identity embedded in the header.
The WebCenter REST client is expected to dispatch the request with this token and header set to "Authorization" to the REST URL (or any other application url), where the OPSS TrustService Identity Asserter is configured.
Example Usage:
URL url = new URL("http://host:port/rest/api/resourceIndex");
String token = WCSecurityUtility.issueTrustServiceSecurityToken();
final String AUTH_TYPE_name="OIT";
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setDoOutput(true);
connection.setReadTimeout(10000);
connection.setRequestProperty("Authorization", AUTH_TYPE_NAME + " " + token);
connection.connect();
public static IdentityStore getDefaultIdentityStore() throws oracle.security.jps.JpsException
oracle.security.jps.JpsException
public static User getUserFromUserName(java.lang.String username) throws IMException
username
- the name string of the userIMException
public static boolean isImpersonationConfigured()
public static boolean isUserInImpersonationSession()
public static java.lang.String getCurrentImpersonatorId()
public static boolean isServiceConfigured(java.lang.String serviceId) throws java.lang.Exception
java.lang.Exception
|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal 11g Release 1 (11.1.1.8.0) E15995-07 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |