Oracle Communications Services Gatekeeper Java API Reference
7.0.0.1

E96578-01

oracle.ocsg.oauth2.management
Interface OAuthManagement


public interface OAuthManagement


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

Method Detail

addClient

public void addClient(java.lang.String appInstanceId,
                      java.lang.String password)
               throws ManagementException
Add client for oauth2

Parameters:
password -
appInstanceId -
Throws:
ManagementException

addPlanScopes

public void addPlanScopes(java.lang.String planId,
                          oracle.ocsg.oauth2.management.xml.OAuthPlanScope planScope)
                   throws ManagementException
Throws:
ManagementException

addResources

public void addResources(java.util.Map resourceList)
                  throws ManagementException
Add resource OAuth resource to database

Parameters:
resourceList -
Throws:
ManagementException

applyAccessToken

public AccessToken applyAccessToken(java.lang.String appInstanceId,
                                    java.lang.String[] scopes)
                             throws StorageException
Apply an access token for application Instance id

Parameters:
appInstanceId -
scopes -
Throws:
StorageException

checkSubScope

public Scope checkSubScope(Scopes scopes,
                           java.lang.String resourceId)

deletePlanScopes

public void deletePlanScopes(java.lang.String planId)
                      throws ManagementException
Throws:
ManagementException

deleteResources

public void deleteResources(java.util.List resourceIds)
                     throws ManagementException
Delete resource OAuth resource

Parameters:
resourceIds -
Throws:
ManagementException

getAccessToken

public AccessToken getAccessToken(java.lang.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 java.lang.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 oracle.ocsg.oauth2.management.xml.OAuthResource getOAuthFromRequest(java.lang.String requestUrl,
                                                                           java.lang.String method)

getPlanScopes

public oracle.ocsg.oauth2.management.xml.OAuthPlanScope getPlanScopes(java.lang.String planId)
                                                               throws ManagementException
Throws:
ManagementException

getResourceList

public java.util.Map getResourceList()
List all the supported OAuth resource in OCSG.

Returns:
the resourse list.

getTokenType

public java.lang.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(java.lang.String appInstanceId)
                          throws StorageException,
                                 ManagementException
Remove client information and access token related with a appInstanceId

Parameters:
appInstanceId -
Throws:
StorageException
ManagementException

removeToken

public void removeToken(java.lang.String appInstanceId)
                 throws StorageException,
                        ManagementException
Throws:
StorageException
ManagementException

start

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


stop

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


Oracle Communications Services Gatekeeper Java API Reference
7.0.0.1

E96578-01

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