Skip navigation links

Oracle Fusion Middleware Java API Reference for the Oracle Access Management OAuth Service
11g Release 2 Patch Set 3 (11.1.2.3)

E59498-01


oracle.security.idaas.oauth.sdk.response
Class OAuthTokenResponse

java.lang.Object
  extended by oracle.security.idaas.oauth.sdk.response.OAuthRestResponse
      extended by oracle.security.idaas.oauth.sdk.response.OAuthTokenResponse

Direct Known Subclasses:
AccessTokenResponse, ClientAssertionTokenResponse, OAMCredentialsTokenResponse, RevocationResponse, UserAssertionTokenResponse

public class OAuthTokenResponse
extends OAuthRestResponse

Basic class handling an OAuth token response.


Field Summary

  Fields inherited from class oracle.security.idaas.oauth.sdk.response.OAuthRestResponse

tok

  Constructor Summary

OAuthTokenResponse(int status, java.lang.String response)
          Analyzes and formats the response as a token response.

  Method Summary

 OAuthToken getAccessToken()
          Returns the access_token.
 java.lang.String getExpiresIn()
          Returns the expires_in
 java.lang.String getOracleTkContext()
          Returns the oracle_tk_context
 OAuthToken getRefreshToken()
          Returns the refresh_token
 java.lang.String getTokenType()
          Returns the token_type
protected  void parseResponse(java.lang.String result)
          Computes the response to extract the tokens information.

  Methods inherited from class oracle.security.idaas.oauth.sdk.response.OAuthRestResponse

getErrorMessage, getStatus, isError, setErrorMessage, toString

  Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

OAuthTokenResponse

public OAuthTokenResponse(int status,
                          java.lang.String response)
                   throws org.codehaus.jettison.json.JSONException
Analyzes and formats the response as a token response.
Parameters:
status - response status (200 means successful)
response - the response message if the request is successful, else the error message
Throws:
org.codehaus.jettison.json.JSONException - if at least one of the mandatory element in the response is missing, or if the response is not formatted correctly.

Method Detail

parseResponse

protected void parseResponse(java.lang.String result)
                      throws org.codehaus.jettison.json.JSONException
Computes the response to extract the tokens information.
Specified by:
parseResponse in class OAuthRestResponse
Parameters:
result - string to decode
Throws:
org.codehaus.jettison.json.JSONException - if at least one of the mandatory element in the response is missing, or if the response is not formatted correctly.

getAccessToken

public OAuthToken getAccessToken()
Returns the access_token.
Returns:
access_token

getRefreshToken

public OAuthToken getRefreshToken()
Returns the refresh_token
Returns:
refresh_token

getExpiresIn

public java.lang.String getExpiresIn()
Returns the expires_in
Returns:
expires_in

getTokenType

public java.lang.String getTokenType()
Returns the token_type
Returns:
token_type

getOracleTkContext

public java.lang.String getOracleTkContext()
Returns the oracle_tk_context
Returns:
oracle_tk_context

Skip navigation links

Copyright (c) 2014, 2015,
Oracle and/or its affiliates. All Rights Reserved.