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 AccessTokenRequest

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


public class AccessTokenRequest
extends OAuthTokenRequest

Class dedicated to receive the Access Token request parameters. Creating Resource Access Token (AT) (and its Refresh Token (RT))


Constructor Summary

AccessTokenRequest()
          Initializes a basic Access Token request without any parameters.
AccessTokenRequest(java.util.Map<java.lang.String,java.lang.String> header, java.util.Map<java.lang.String,java.lang.String> query)
          Initializes the Access Token request using the given parameters.
AccessTokenRequest(java.lang.String grantType, ClientIdSecretPair clientCredentials, java.lang.String scope)
          Constructor dedicated to AT5 case: Confidential Client to use Client Secret to acquire a JWT-based Resource Access Token (AT) (which does not require a user identity)
AccessTokenRequest(java.lang.String grantType, ClientIdSecretPair clientCredentials, java.lang.String assertion, java.lang.String scope)
          Constructor dedicated to AT4 case: Confidential Client to use Client Secret and User Assertion Token (SAML / JWT based) to acquire a JWT-based Resource Access Token (AT)
AccessTokenRequest(java.lang.String grantType, ClientIdSecretPair clientCredentials, java.lang.String username, java.lang.String password, java.lang.String scope)
          Constructor dedicated to AT3 case: Confidential Client to use Client Secret and User Pwd to acquire a JWT-based Resource Access Token (AT)
AccessTokenRequest(java.lang.String grantType, java.lang.String clientId, java.lang.String clientAssertionType, java.lang.String clientAssertion, java.lang.String scope)
          Constructor dedicated to AT2 case: Confidential Client to use Client Assertion (SAML / JWT based) to acquire a JWT-based Resource Access Token (AT) (which does not require a user identity)
AccessTokenRequest(java.lang.String grantType, java.lang.String assertion, java.lang.String clientId, java.lang.String clientAssertionType, java.lang.String clientAssertion, java.lang.String scope)
          Constructor dedicated to AT1 case: Confidential Client to use Client Assertion (SAML / JWT based) and User Assertion Grant (SAML / JWT based) to acquire a JWT-based Resource Access Token (AT).

  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 getPassword()
          returns the password
 java.lang.String getScope()
          Returns the scope.
 java.lang.String getUsername()
          Returns the username.
 boolean isJwtClientAssertion()
          Return true if the client assertion is a JWT one.
 boolean isSamlClientAssertion()
          Return 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 setPassword(java.lang.String password)
          Updates the password.
 void setScope(java.lang.String scope)
          Update the scope.
 void setUsername(java.lang.String username)
          Update the username

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

getGrantType

  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

 

Constructor Detail

AccessTokenRequest

public AccessTokenRequest()
Initializes a basic Access Token request without any parameters.

AccessTokenRequest

public AccessTokenRequest(java.util.Map<java.lang.String,java.lang.String> header,
                          java.util.Map<java.lang.String,java.lang.String> query)
Initializes the Access Token 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

AccessTokenRequest

public AccessTokenRequest(java.lang.String grantType,
                          java.lang.String assertion,
                          java.lang.String clientId,
                          java.lang.String clientAssertionType,
                          java.lang.String clientAssertion,
                          java.lang.String scope)
                   throws java.lang.IllegalArgumentException
Constructor dedicated to AT1 case: Confidential Client to use Client Assertion (SAML / JWT based) and User Assertion Grant (SAML / JWT based) to acquire a JWT-based Resource Access Token (AT).
Parameters:
grantType - only accepts OAuthSdkConstants.JWT_GRANT_TYPE or OAuthSdkConstants.SAML_GRANT_TYPE
assertion - user assertion, see also UserAssertionTokenRequest
clientId - client identifier
clientAssertionType - accept only OAuthSdkConstants.SAML_CLIENT_ASSERTION_TYPE or OAuthSdkConstants.JWT_CLIENT_ASSERTION_TYPE
clientAssertion - client assertion, see also ClientAssertionTokenRequest
scope - space separated list of scopes
Throws:
java.lang.IllegalArgumentException - when invalid argument is provided

AccessTokenRequest

public AccessTokenRequest(java.lang.String grantType,
                          java.lang.String clientId,
                          java.lang.String clientAssertionType,
                          java.lang.String clientAssertion,
                          java.lang.String scope)
                   throws java.lang.IllegalArgumentException
Constructor dedicated to AT2 case: Confidential Client to use Client Assertion (SAML / JWT based) to acquire a JWT-based Resource Access Token (AT) (which does not require a user identity)
Parameters:
grantType - only accepts OAuthSdkConstants.CLIENT_CREDENTIALS_GRANT_TYPE
clientId - client identifier
clientAssertionType - accept only OAuthSdkConstants.SAML_CLIENT_ASSERTION_TYPE or OAuthSdkConstants.JWT_CLIENT_ASSERTION_TYPE
clientAssertion - client assertion, see also ClientAssertionTokenRequest
scope - space separated list of scopes
Throws:
java.lang.IllegalArgumentException - when invalid argument is provided

AccessTokenRequest

public AccessTokenRequest(java.lang.String grantType,
                          ClientIdSecretPair clientCredentials,
                          java.lang.String username,
                          java.lang.String password,
                          java.lang.String scope)
                   throws java.lang.IllegalArgumentException
Constructor dedicated to AT3 case: Confidential Client to use Client Secret and User Pwd to acquire a JWT-based Resource Access Token (AT)
Parameters:
grantType - only accepts OAuthSdkConstants.PASSWORD_GRANT_TYPE
clientCredentials - client information
username - user name
password - password
scope - space separated list of scopes
Throws:
java.lang.IllegalArgumentException - when invalid argument is provided

AccessTokenRequest

public AccessTokenRequest(java.lang.String grantType,
                          ClientIdSecretPair clientCredentials,
                          java.lang.String assertion,
                          java.lang.String scope)
                   throws java.lang.IllegalArgumentException
Constructor dedicated to AT4 case: Confidential Client to use Client Secret and User Assertion Token (SAML / JWT based) to acquire a JWT-based Resource Access Token (AT)
Parameters:
grantType - only accepts OAuthSdkConstants.JWT_GRANT_TYPE or OAuthSdkConstants.SAML_GRANT_TYPE
clientCredentials - client info
assertion - assertion
scope - space separated list of scopes
Throws:
java.lang.IllegalArgumentException - when invalid argument is provided

AccessTokenRequest

public AccessTokenRequest(java.lang.String grantType,
                          ClientIdSecretPair clientCredentials,
                          java.lang.String scope)
                   throws java.lang.IllegalArgumentException
Constructor dedicated to AT5 case: Confidential Client to use Client Secret to acquire a JWT-based Resource Access Token (AT) (which does not require a user identity)
Parameters:
grantType - only accepts OAuthSdkConstants.CLIENT_CREDENTIALS_GRANT_TYPE
clientCredentials - client info
scope - space separated list of scopes
Throws:
java.lang.IllegalArgumentException - when invalid argument is provided

Method Detail

setGrantType

public void setGrantType(java.lang.String grantType)
Updates the grant_type. Accepts only:
Overrides:
setGrantType in class OAuthTokenRequest
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

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 - type of client assertion

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()
Return true if the client assertion is a JWT one.
Returns:
true for JWT

isSamlClientAssertion

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

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

getUsername

public java.lang.String getUsername()
Returns the username.
Returns:
username

setUsername

public void setUsername(java.lang.String username)
Update the username
Parameters:
username - name of user

getPassword

public java.lang.String getPassword()
returns the password
Returns:
password

setPassword

public void setPassword(java.lang.String password)
Updates the password.
Parameters:
password - password

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 given

Skip navigation links

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