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.request
Class AccessTokenValidationRequest

java.lang.Object
  extended by oracle.security.idaas.oauth.sdk.request.OAuthRestRequest
      extended by oracle.security.idaas.oauth.sdk.request.AccessTokenValidationRequest


public class AccessTokenValidationRequest
extends OAuthRestRequest

Class dedicated to the Token Validation request.
There are 2 ways to validate a token depending on the client information the user gets.

The grant type to be used to build such request is always OAuthSdkConstants.ORACLE_IDM_GRANT_TYPE_USER_TOKEN_JWT or OAuthSdkConstants.ORACLE_IDM_GRANT_TYPE_RESOURCE_ACCESS_TOKEN_JWT or OAuthSdkConstants.ORACLE_IDM_GRANT_TYPE_CLIENT_TOKEN_JWT.


Field Summary

static java.lang.String ORACLE_TOKEN_ACTION_QUERY_PARAM_NAME
          oracle_token_action

  Constructor Summary

AccessTokenValidationRequest()
          Initializes the OAuth Token Validation request without any parameters.
AccessTokenValidationRequest(ClientIdSecretPair clientCredentials, java.lang.String grantType, java.lang.String assertion, java.lang.String scope, java.lang.String attrsRetrieval)
          Initializes the OAuth Token Validation request using Client Secret (e.g.
AccessTokenValidationRequest(java.util.Map<java.lang.String,java.lang.String> header, java.util.Map<java.lang.String,java.lang.String> query)
          Initializes the OAuth Token Validation request using the given parameters.
AccessTokenValidationRequest(java.lang.String clientId, java.lang.String clientAssertionType, java.lang.String clientAssertion, java.lang.String grantType, java.lang.String assertion, java.lang.String scope, java.lang.String attrsRetrieval)
          Initializes the OAuth Token Validation request using Client Assertion to validate a Token.

  Method Summary

 java.lang.String getAssertion()
          Returns the assertion
 java.lang.String getClientAssertion()
          Returns the client_assertion
 java.lang.String getClientAssertionType()
          Returns the client_assertion_type
 ClientIdSecretPair getClientCredentials()
          Returns the client id and secret.
 java.lang.String getClientId()
          Returns the client_id
 java.lang.String getGrantType()
          Returns the grant_type
 java.lang.String getOracleTokenAttrsRetrieval()
          Returns the oracle_token_attrs_retrieval.
 java.lang.String getScope()
          Returns the scope.
 boolean isJwtClientAssertion()
          Returns true if the client assertion is a JWT one.
 boolean isSamlClientAssertion()
          Returns true if the client assertion is a SAML one.
 void setAssertion(java.lang.String assertion)
          Updates the assertion
 void setClientAssertion(java.lang.String clientAssertion)
          Updates the client_assertion
 void setClientAssertionType(java.lang.String clientAssertionType)
          Updates the client_assertion_type.
 void setClientCredentials(ClientIdSecretPair clientCredentials)
          Updates the client id and secret
 void setClientId(java.lang.String clientId)
          Update the client_id
 void setGrantType(java.lang.String grantType)
          Updates the grant_type.
 void setOracleTokenAttrsRetrieval(java.lang.String atrsRetrieval)
          Update the oracle_token_attrs_retrieval.
 void setScope(java.lang.String scope)
          Update the scope.

  Methods inherited from class oracle.security.idaas.oauth.sdk.request.OAuthRestRequest

addHeader, addQuery, clearAll, clearHeader, clearQuery, getHeader, getHeader, getQuery, getQuery, getQueryMap, isNullOrEmpty, setHeader, setQuery

  Methods inherited from class java.lang.Object

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

 

Field Detail

ORACLE_TOKEN_ACTION_QUERY_PARAM_NAME

public static final java.lang.String ORACLE_TOKEN_ACTION_QUERY_PARAM_NAME
oracle_token_action
See Also:
Constant Field Values

Constructor Detail

AccessTokenValidationRequest

public AccessTokenValidationRequest()
Initializes the OAuth Token Validation request without any parameters.

AccessTokenValidationRequest

public AccessTokenValidationRequest(java.util.Map<java.lang.String,java.lang.String> header,
                                    java.util.Map<java.lang.String,java.lang.String> query)
Initializes the OAuth Token Validation request using the given parameters.
Parameters:
header - set of parameters to fit into the request header
query - set of parameters to fit into the data part

AccessTokenValidationRequest

public AccessTokenValidationRequest(ClientIdSecretPair clientCredentials,
                                    java.lang.String grantType,
                                    java.lang.String assertion,
                                    java.lang.String scope,
                                    java.lang.String attrsRetrieval)
Initializes the OAuth Token Validation request using Client Secret (e.g. Resource Server ID and its Secret) to validate a Token.
Parameters:
clientCredentials - client information
grantType - only accepts OAuthSdkConstants.ORACLE_IDM_GRANT_TYPE_USER_TOKEN_JWT or OAuthSdkConstants.ORACLE_IDM_GRANT_TYPE_RESOURCE_ACCESS_TOKEN_JWT or OAuthSdkConstants.ORACLE_IDM_GRANT_TYPE_CLIENT_TOKEN_JWT
assertion - assertion
scope - space separated list of scopes
attrsRetrieval - attributes to return

AccessTokenValidationRequest

public AccessTokenValidationRequest(java.lang.String clientId,
                                    java.lang.String clientAssertionType,
                                    java.lang.String clientAssertion,
                                    java.lang.String grantType,
                                    java.lang.String assertion,
                                    java.lang.String scope,
                                    java.lang.String attrsRetrieval)
Initializes the OAuth Token Validation request using Client Assertion to validate a Token.
Parameters:
clientId - client identifier
clientAssertionType - accept only OAuthSdkConstants.SAML_CLIENT_ASSERTION_TYPE or OAuthSdkConstants.JWT_CLIENT_ASSERTION_TYPE
clientAssertion - client assertion, see also ClientAssertionTokenRequest
grantType - only accepts OAuthSdkConstants.ORACLE_IDM_GRANT_TYPE_USER_TOKEN_JWT or OAuthSdkConstants.ORACLE_IDM_GRANT_TYPE_RESOURCE_ACCESS_TOKEN_JWT or OAuthSdkConstants.ORACLE_IDM_GRANT_TYPE_CLIENT_TOKEN_JWT
assertion - string
scope - space separated list of scopes
attrsRetrieval - list of attributes

Method Detail

getClientCredentials

public ClientIdSecretPair getClientCredentials()
Returns the client id and secret.
Returns:
client id and secret

setClientCredentials

public void setClientCredentials(ClientIdSecretPair clientCredentials)
                          throws java.lang.IllegalArgumentException
Updates the client id and secret
Parameters:
clientCredentials - client information
Throws:
java.lang.IllegalArgumentException - when invalid argument is provided

getGrantType

public java.lang.String getGrantType()
Returns the grant_type
Returns:
grant_type

setGrantType

public void setGrantType(java.lang.String grantType)
Updates the grant_type. Accepts only:
Parameters:
grantType - grant type

getAssertion

public java.lang.String getAssertion()
Returns the assertion
Returns:
assertion

setAssertion

public void setAssertion(java.lang.String assertion)
Updates the assertion
Parameters:
assertion - assertion

getScope

public java.lang.String getScope()
Returns the scope.
Returns:
scope

setScope

public void setScope(java.lang.String scope)
Update the scope. The scope names shall be separated by the space character " ".
If the scope is null or empty then scope is set to none.
Parameters:
scope - space separated list of scopes

getOracleTokenAttrsRetrieval

public java.lang.String getOracleTokenAttrsRetrieval()
Returns the oracle_token_attrs_retrieval.
Returns:
scope

setOracleTokenAttrsRetrieval

public void setOracleTokenAttrsRetrieval(java.lang.String atrsRetrieval)
Update the oracle_token_attrs_retrieval. The attribute names shall be separated by the space character " ".
Parameters:
atrsRetrieval - attributes to return

getClientId

public java.lang.String getClientId()
Returns the client_id
Returns:
client_id

setClientId

public void setClientId(java.lang.String clientId)
Update the client_id
Parameters:
clientId - client identifier

getClientAssertionType

public java.lang.String getClientAssertionType()
Returns the client_assertion_type
Returns:
client_assertion_type

setClientAssertionType

public void setClientAssertionType(java.lang.String clientAssertionType)
Updates the client_assertion_type. Accepts only:
Parameters:
clientAssertionType - assertion type

getClientAssertion

public java.lang.String getClientAssertion()
Returns the client_assertion
Returns:
client_assertion

setClientAssertion

public void setClientAssertion(java.lang.String clientAssertion)
Updates the client_assertion
Parameters:
clientAssertion - assertion

isJwtClientAssertion

public boolean isJwtClientAssertion()
Returns true if the client assertion is a JWT one.
Returns:
true for JWT

isSamlClientAssertion

public boolean isSamlClientAssertion()
Returns true if the client assertion is a SAML one.
Returns:
true for SAML

Skip navigation links

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