Skip navigation links

Oracle Communications Services Gatekeeper Java API Reference
6.0

E55513-02


oracle.ocsg.oauth2.management
Interface OAuthManagement


public interface OAuthManagement

Method Summary
 void addClient(String appInstanceId, String password)
          Add client for oauth2
 void addResources(Map resourceList)
          Add resource OAuth resource to database
 AccessToken applyAccessToken(String appInstanceId, String[] scopes)
          Apply an access token for application Instance id
 Scope checkSubScope(Scopes scopes, String resourceId)
           
 void deleteResources(List resourceIds)
          Delete resource OAuth resource
 AccessToken getAccessToken(String appInstanceId)
          get access token of a special appInstanceId
 int getAuthorizationCodeExpirePeriod()
          Get the authorization code expire period by seconds.
 String getMacAlgorithm()
          Get the MAC algorithm used to calculate the request MAC for access token.
 OAuthResource getOAuthFromRequest(String requestUrl, String method)
           
 Map getResourceList()
          List all the supported OAuth resource in OCSG.
 String getTokenType()
          Get The token type, only support 'mac' and 'bearer'.
 boolean isIssueRefreshToken()
          Whether generate refesh token when issing access token.
 boolean isSendAnonymousId()
          Get the flag about whether or not include AnonymousId in applyAccessToken response event.
 void removeClientAndToken(String appInstanceId)
          Remove client information and access token related with a appInstanceId
 void start()
          Start OAuth management, register OAuth MBeans.
 void stop()
          Stop OAuth management, unregister OAuth MBeans.

 

Method Detail

addClient

public void addClient(String appInstanceId,
                      String password)
               throws ManagementException
Add client for oauth2
Parameters:
password -
appInstanceId -
Throws:
ManagementException

addResources

public void addResources(Map resourceList)
                  throws ManagementException
Add resource OAuth resource to database
Parameters:
resourceList -
Throws:
ManagementException

applyAccessToken

public AccessToken applyAccessToken(String appInstanceId,
                                    String[] scopes)
                             throws StorageException
Apply an access token for application Instance id
Parameters:
appInstanceId -
scopes -
Throws:
StorageException

checkSubScope

public Scope checkSubScope(Scopes scopes,
                           String resourceId)

deleteResources

public void deleteResources(List resourceIds)
                     throws ManagementException
Delete resource OAuth resource
Parameters:
resourceIds -
Throws:
ManagementException

getAccessToken

public AccessToken getAccessToken(String appInstanceId)
                           throws StorageException
get access token of a special appInstanceId
Parameters:
appInstanceId -
Returns:
AccessToken
Throws:
StorageException

getAuthorizationCodeExpirePeriod

public int getAuthorizationCodeExpirePeriod()
Get the authorization code expire period by seconds.
Returns:
the authorization code expire period by seconds.

getMacAlgorithm

public String getMacAlgorithm()
Get the MAC algorithm used to calculate the request MAC for access token. Only support 'hmac-sha-1' and 'hmac-sha-256'.
Returns:
the algorithm string.

getOAuthFromRequest

public OAuthResource getOAuthFromRequest(String requestUrl,
                                         String method)

getResourceList

public Map getResourceList()
List all the supported OAuth resource in OCSG.
Returns:
the resourse list.

getTokenType

public String getTokenType()
Get The token type, only support 'mac' and 'bearer'.
Returns:
the token type string.

isIssueRefreshToken

public boolean isIssueRefreshToken()
Whether generate refesh token when issing access token.
Returns:
flag, true value means to generate refresh token.

isSendAnonymousId

public boolean isSendAnonymousId()
Get the flag about whether or not include AnonymousId in applyAccessToken response event.
Returns:
flag, true value means to include AnonymousId.

removeClientAndToken

public void removeClientAndToken(String appInstanceId)
                          throws StorageException,
                                 ManagementException
Remove client information and access token related with a appInstanceId
Parameters:
appInstanceId -
Throws:
StorageException
ManagementException

start

public void start()
Start OAuth management, register OAuth MBeans.

stop

public void stop()
Stop OAuth management, unregister OAuth MBeans.

Skip navigation links

Oracle Communications Services Gatekeeper Java API Reference
6.0

E55513-02


Copyright © 2008, 2015, Oracle and/or its affiliates. All rights reserved.