Search in sources :

Example 1 with AdminTokenId

use of com.sun.identity.security.AdminTokenId in project OpenAM by OpenRock.

the class OAuthServiceUtils method getAdminTokenId.

// This method is only called in server mode
public static String getAdminTokenId() throws OAuthServiceException {
    String adminTokenIdString = null;
    try {
        AdminTokenId adminTokenId = (AdminTokenId) Class.forName("com.sun.identity.security.AdminTokenIdImpl").newInstance();
        adminTokenIdString = adminTokenId.getAdminTokenId();
    } catch (Exception e) {
        throw new OAuthServiceException("Getting Admin token failed", e);
    }
    return adminTokenIdString;
}
Also used : AdminTokenId(com.sun.identity.security.AdminTokenId) OAuthServiceException(com.sun.identity.oauth.service.OAuthServiceException) UniformInterfaceException(com.sun.jersey.api.client.UniformInterfaceException) OAuthServiceException(com.sun.identity.oauth.service.OAuthServiceException)

Aggregations

OAuthServiceException (com.sun.identity.oauth.service.OAuthServiceException)1 AdminTokenId (com.sun.identity.security.AdminTokenId)1 UniformInterfaceException (com.sun.jersey.api.client.UniformInterfaceException)1