|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal 11g Release 1 (11.1.1.6.0) E15995-05 |
||||||||
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 IdentityStore |
getDefaultIdentityStore() Gets the default identity store configured |
static User |
getUserFromUserName(java.lang.String username) Gets the user object given the user name |
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. |
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
|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal 11g Release 1 (11.1.1.6.0) E15995-05 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |