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.jersey
Class JerseyClient

java.lang.Object
  extended by oracle.security.idaas.oauth.sdk.jersey.JerseyClient

All Implemented Interfaces:
OAuthClient

public class JerseyClient
extends java.lang.Object
implements OAuthClient

Implements the OAuthClient interface using a Jersey Client.


Constructor Summary

JerseyClient(java.io.InputStream inputStream)
          Constructor reading the configuration from the given InputStream.
JerseyClient(java.util.Properties properties)
          Constructor using a Java Properties format for client configuration.
JerseyClient(java.net.URL config)
          Constructor using URL location of the Properties file containing client configuration.

  Method Summary

 OAuthTokenResponse createToken(OAuthTokenRequest request)
          Returns a formated response including the token information or an error.
 java.lang.String getProperty(java.lang.String key)
          Returns the value of given key.
 void setProperty(java.lang.String key, java.lang.String value)
          Changes the value of corresponding key.
 RevocationResponse terminateToken(RevocationRequest request)
          Terminates a Token and returns the result.
 AccessTokenValidationResponse validateToken(AccessTokenValidationRequest request)
          Returns a formated response including the token validation or an error.

  Methods inherited from class java.lang.Object

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

 

Constructor Detail

JerseyClient

public JerseyClient(java.util.Properties properties)
Constructor using a Java Properties format for client configuration. The minimum configuration shall include the following string properties:
Parameters:
properties - configuration

JerseyClient

public JerseyClient(java.net.URL config)
             throws java.io.IOException
Constructor using URL location of the Properties file containing client configuration. The minimum configuration shall include the following string properties:
 oauthServiceProfileUrl=http://hostname:portNumber/ms_oauth/oauth2/endpoints/...
 useProxy=true|false
 proxyHost=hostname
 proxyPort=portNumber
 outputCurlCde=true|false
 
Parameters:
config - configuration location
Throws:
java.io.IOException - if an I/O error occurs.

JerseyClient

public JerseyClient(java.io.InputStream inputStream)
             throws java.io.IOException
Constructor reading the configuration from the given InputStream. The minimum configuration shall include the following string properties:
 oauthServiceProfileUrl=http://hostname:portNumber/ms_oauth/oauth2/endpoints/...
 useProxy=true|false
 proxyHost=hostname
 proxyPort=portNumber
 outputCurlCde=true|false
 
Parameters:
inputStream - Configuration information
Throws:
java.io.IOException - if an I/O error occurs.

Method Detail

setProperty

public void setProperty(java.lang.String key,
                        java.lang.String value)
Changes the value of corresponding key.
Parameters:
key - name of attribute
value - value

getProperty

public java.lang.String getProperty(java.lang.String key)
Returns the value of given key.
Parameters:
key - name
Returns:
string formatted value

createToken

public OAuthTokenResponse createToken(OAuthTokenRequest request)
                               throws OAuthSdkException
Description copied from interface: OAuthClient
Returns a formated response including the token information or an error.
Specified by:
createToken in interface OAuthClient
Parameters:
request - containing the header and data information
Returns:
the result of the call containing at least and access_token
Throws:
OAuthSdkException - in case of failure

validateToken

public AccessTokenValidationResponse validateToken(AccessTokenValidationRequest request)
                                            throws OAuthSdkException
Description copied from interface: OAuthClient
Returns a formated response including the token validation or an error.
Specified by:
validateToken in interface OAuthClient
Parameters:
request - containing the header and data information
Returns:
the result of the token validation
Throws:
OAuthSdkException - in case of failure

terminateToken

public RevocationResponse terminateToken(RevocationRequest request)
                                  throws OAuthSdkException
Description copied from interface: OAuthClient
Terminates a Token and returns the result.
Specified by:
terminateToken in interface OAuthClient
Parameters:
request - contains the revocation token information
Returns:
the response
Throws:
OAuthSdkException - in case of failure

Skip navigation links

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