Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Access Management Mobile and Social


oracle.security.idaas.rest.jaxrs.client.sdk.authentication
Class AuthenticationClient

java.lang.Object
  extended by oracle.security.idaas.rest.jaxrs.client.sdk.authentication.AuthenticationClient


public class AuthenticationClient
extends java.lang.Object

This is the primary class used for clients to access the authentication REST services. Used to make requests and get responses over HTTP interactions with authentication token service.


Constructor Summary
AuthenticationClient(ClientSDKConfig config)
          Constructor for the Authentication Client Helper.

 

Method Summary
static Headers buildHeaders(java.lang.String appId, java.lang.String CRH)
          Used to build the http Headers map data only one entry in the map data which is in form such as 'X-IDAAS-REST-AUTHORIZATION: UIDPASSWORD cred="...
static Headers buildHeaders(java.lang.String appId, java.lang.String CRH, java.lang.String agentAppId, java.lang.String agentCRH)
          Used to build the http Headers map data Tow entries in the map data which are n form such as 'X-IDAAS-REST-AUTHORIZATION: UIDPASSWORD cred="...
 AuthenticationResult createToken(TokenCreateRequest tokenData, Headers headers)
          Authenticating and creating a new token based on a username and password.
 java.lang.String createToken(TokenCreateRequest tokenData, java.util.Map<java.lang.String,java.lang.Object> handles, java.util.Map<java.lang.String,java.lang.Object> deviceProfile, Headers headers)
          Authenticating and creating a new token based on a username and password, plus a handle and a deviceProfile.
 java.lang.String createToken(TokenCreateRequest tokenData, java.util.Map<java.lang.String,java.lang.Object> handles, java.util.Map<java.lang.String,java.lang.Object> deviceProfile, java.util.Map<java.lang.String,java.lang.Object> challengeAnswer, Headers headers)
          Authenticating and creating a new token based on a username and password, plus a handle and a deviceProfile.
 AuthenticationResult createToken(TokenExchangeRequest tokenData, Headers headers)
          Authenticating and creating a new token based on an existing token.
 java.lang.String createToken(TokenExchangeRequest tokenData, java.util.Map<java.lang.String,java.lang.Object> handles, java.util.Map<java.lang.String,java.lang.Object> deviceProfile, Headers headers)
          Authenticating and creating a new token based on an existing token, plus a handle and a deviceProfile.
 java.lang.String createToken(TokenExchangeRequest tokenData, java.util.Map<java.lang.String,java.lang.Object> handles, java.util.Map<java.lang.String,java.lang.Object> deviceProfile, java.util.Map<java.lang.String,java.lang.Object> challengeAnswer, Headers headers)
          Authenticating and creating a new token based on an existing token, plus a handle and a deviceProfile.
 org.codehaus.jettison.json.JSONArray createTokens(TokenCreateRequest tokenData, java.util.List<java.lang.String> tokenToBeCreated, Headers headers)
          Authenticating and creating multiple tokens based on a username and password.
 boolean deleteToken(TokenDeleteRequest tokenToDelete, Headers headers)
          Used to delete an existing token for logging out.
 AuthenticationResult readToken(TokenReadRequest tokenToRead, Headers headers)
          Used to read or verify an existing token.
 java.lang.String registerApplication(TokenCreateRequest tokenData, java.util.Map<java.lang.String,java.lang.Object> handles, java.util.Map<java.lang.String,java.lang.Object> deviceProfile, java.util.Map<java.lang.String,java.lang.Object> challengeAnswer, java.lang.String clientId, Headers headers)
          Registering application for obtaining Client Registration Handle based on a username and password or challenge/answer, plus a handle and a deviceProfile.
 java.lang.String registerApplication(TokenCreateRequest tokenData, java.util.Map<java.lang.String,java.lang.Object> handles, java.util.Map<java.lang.String,java.lang.Object> deviceProfile, java.lang.String clientId, Headers headers)
          Registering application for obtaining Client Registration Handle based on a username and password, plus a handle and a deviceProfile.
 java.lang.String registerApplication(TokenExchangeRequest tokenData, java.util.Map<java.lang.String,java.lang.Object> handles, java.util.Map<java.lang.String,java.lang.Object> deviceProfile, java.lang.String clientId, Headers headers)
          Registering application for obtaining Client Registration Handle given User Token through agent application, plus a handle and a deviceProfile.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

AuthenticationClient

public AuthenticationClient(ClientSDKConfig config)
                     throws OICClientException
Constructor for the Authentication Client Helper.
Parameters:
config - is the ClientSDKConfig instance holding the configuration information the cleintsdk needs to interact with the authentication REST HTTP services. For example, it would contain the uri of the deployed authentication services intended to be accessed.
Throws:
OICClientException

Method Detail

registerApplication

public java.lang.String registerApplication(TokenCreateRequest tokenData,
                                            java.util.Map<java.lang.String,java.lang.Object> handles,
                                            java.util.Map<java.lang.String,java.lang.Object> deviceProfile,
                                            java.lang.String clientId,
                                            Headers headers)
                                     throws OICClientException
Registering application for obtaining Client Registration Handle based on a username and password, plus a handle and a deviceProfile.
Parameters:
tokenData - is the data set of attributes etc to create the token. The data is usercredentials in TokenCreateRequest.
handles - hold the handle data.
deviceProfile - hold the device information.
clientId - application or agent application profile id.
headers - is data containing Client Registration Handle obtained from application registration.
Returns:
the json response containing the token with its attributes like type and value, plus handles data.
Throws:
OICClientException

registerApplication

public java.lang.String registerApplication(TokenCreateRequest tokenData,
                                            java.util.Map<java.lang.String,java.lang.Object> handles,
                                            java.util.Map<java.lang.String,java.lang.Object> deviceProfile,
                                            java.util.Map<java.lang.String,java.lang.Object> challengeAnswer,
                                            java.lang.String clientId,
                                            Headers headers)
                                     throws OICClientException
Registering application for obtaining Client Registration Handle based on a username and password or challenge/answer, plus a handle and a deviceProfile.
Parameters:
tokenData - is the data set of attributes etc to create the token. The data is usercredentials in TokenCreateRequest.
handles - hold the handle data.
deviceProfile - hold the device information.
challengeAnswer - hold the challenge answer for strong authentication.
clientId - application or agent application profile id.
headers - is data containing Client Registration Handle obtained from application registration.
Returns:
the json response containing the token with its attributes like type and value, plus handles data.
Throws:
OICClientException

registerApplication

public java.lang.String registerApplication(TokenExchangeRequest tokenData,
                                            java.util.Map<java.lang.String,java.lang.Object> handles,
                                            java.util.Map<java.lang.String,java.lang.Object> deviceProfile,
                                            java.lang.String clientId,
                                            Headers headers)
                                     throws OICClientException
Registering application for obtaining Client Registration Handle given User Token through agent application, plus a handle and a deviceProfile.
Parameters:
tokenData - is the data set of attributes etc to create the CRH. The data is user token through agent application.
handles - holds the handle data.
deviceProfile - hold the device information.
clientId - application or agent application profile id.
headers - is data containing Client Registration Handle obtained from application registration.
Returns:
the json response, containing the token with its attributes like type and value, plus handles data.
Throws:
OICClientException

createToken

public AuthenticationResult createToken(TokenCreateRequest tokenData,
                                        Headers headers)
                                 throws OICClientException
Authenticating and creating a new token based on a username and password. It is for Desktop use cases.
Parameters:
headers - contains the headers
tokenData - is the data set of attributes etc to create the token. The data is usercredentials in TokenCreateRequest.
Returns:
the token, containing attributes like type and value.
Throws:
OICClientException

createTokens

public org.codehaus.jettison.json.JSONArray createTokens(TokenCreateRequest tokenData,
                                                         java.util.List<java.lang.String> tokenToBeCreated,
                                                         Headers headers)
                                                  throws OICClientException
Authenticating and creating multiple tokens based on a username and password. It is for Desktop use cases.
Parameters:
headers - contains the headers
tokenData - is the data set of attributes etc to create the token. The data is usercredentials in TokenCreateRequest.
tokenToBeCreated - is data containing the token types to be created
Returns:
the json response, containing the created tokens with its attributes like type and value, plus handles data.
Throws:
OICClientException

createToken

public java.lang.String createToken(TokenCreateRequest tokenData,
                                    java.util.Map<java.lang.String,java.lang.Object> handles,
                                    java.util.Map<java.lang.String,java.lang.Object> deviceProfile,
                                    Headers headers)
                             throws OICClientException
Authenticating and creating a new token based on a username and password, plus a handle and a deviceProfile. It's for Mobile use cases.
Parameters:
tokenData - is the data set of attributes etc to create the token. The data is usercredentials in TokenCreateRequest.
handles - holds the handle data.
deviceProfile - hold the device information.
headers - is data containing Client Registration Handle obtained from application registration.
Returns:
the json response, containing the token with its attributes like type and value, plus handles data.
Throws:
OICClientException

createToken

public java.lang.String createToken(TokenCreateRequest tokenData,
                                    java.util.Map<java.lang.String,java.lang.Object> handles,
                                    java.util.Map<java.lang.String,java.lang.Object> deviceProfile,
                                    java.util.Map<java.lang.String,java.lang.Object> challengeAnswer,
                                    Headers headers)
                             throws OICClientException
Authenticating and creating a new token based on a username and password, plus a handle and a deviceProfile. It's for Mobile use cases.
Parameters:
tokenData - is the data set of attributes etc to create the token. The data is usercredentials in TokenCreateRequest.
handles - holds the handle data.
deviceProfile - hold the device information.
challengeAnswer - hold the challenge answer for strong authentication
headers - is data containing Client Registration Handle obtained from application registration.
Returns:
the json response, containing the token with its attributes like type and value, plus handles data.
Throws:
OICClientException

createToken

public AuthenticationResult createToken(TokenExchangeRequest tokenData,
                                        Headers headers)
                                 throws OICClientException
Authenticating and creating a new token based on an existing token. It's for Desktop use cases for using User token for exchange of Access token.
Parameters:
headers - contains the headers
tokenData - is the data set of attributes etc to create the token. The data includes a token as part of credentials which is in TokenExchangeRequest.
Returns:
the token, containing attributes like type and value.
Throws:
OICClientException

createToken

public java.lang.String createToken(TokenExchangeRequest tokenData,
                                    java.util.Map<java.lang.String,java.lang.Object> handles,
                                    java.util.Map<java.lang.String,java.lang.Object> deviceProfile,
                                    Headers headers)
                             throws OICClientException
Authenticating and creating a new token based on an existing token, plus a handle and a deviceProfile. It's for Mobile use cases for using User token for exchange of Access token.
Parameters:
tokenData - is the data set of attributes etc to create the token. The data is usercredentials in TokenExchangeRequest.
handles - holds the handle data.
deviceProfile - hold the device information.
headers - is data containing Client Registration Handle obtained from application registration.
Returns:
the json response, containing the token with its attributes like type and value, plus handles data.
Throws:
OICClientException

createToken

public java.lang.String createToken(TokenExchangeRequest tokenData,
                                    java.util.Map<java.lang.String,java.lang.Object> handles,
                                    java.util.Map<java.lang.String,java.lang.Object> deviceProfile,
                                    java.util.Map<java.lang.String,java.lang.Object> challengeAnswer,
                                    Headers headers)
                             throws OICClientException
Authenticating and creating a new token based on an existing token, plus a handle and a deviceProfile. It's for Mobile use cases for using User token for exchange of Access token.
Parameters:
tokenData - is the data set of attributes etc to create the token. The data is usercredentials in TokenExchangeRequest.
handles - holds the handle data.
deviceProfile - hold the device information.
challengeAnswer - hold the challenge answer for strong authentication
headers - is data containing Client Registration Handle obtained from application registration.
Returns:
the json response, containing the token with its attributes like type and value, plus handles data.
Throws:
OICClientException

readToken

public AuthenticationResult readToken(TokenReadRequest tokenToRead,
                                      Headers headers)
                               throws OICClientException
Used to read or verify an existing token. The existing token is passed in as a parameter.
Parameters:
headers - contains the headers
tokenToRead - contains data for a read request
Returns:
the token with its attributes like type and value.
Throws:
OICClientException

deleteToken

public boolean deleteToken(TokenDeleteRequest tokenToDelete,
                           Headers headers)
                    throws OICClientException
Used to delete an existing token for logging out. The token to be terminated is passed in as a method parameter.
Parameters:
tokenToDelete - is set of attributes for the token that will be deleted.
headers - contains the headers
Throws:
OICClientException

buildHeaders

public static Headers buildHeaders(java.lang.String appId,
                                   java.lang.String CRH)
                            throws OICClientException
Used to build the http Headers map data only one entry in the map data which is in form such as 'X-IDAAS-REST-AUTHORIZATION: UIDPASSWORD cred="... <token value> ...."'
Parameters:
appId - is Application Profile ID.
CRH - is Client Registration Handle which is obtained through Registration Application step.
Returns:
headers contains Map with key
Throws:
OICClientException

buildHeaders

public static Headers buildHeaders(java.lang.String appId,
                                   java.lang.String CRH,
                                   java.lang.String agentAppId,
                                   java.lang.String agentCRH)
                            throws OICClientException
Used to build the http Headers map data Tow entries in the map data which are n form such as 'X-IDAAS-REST-AUTHORIZATION: UIDPASSWORD cred="... <token value> ...."' 'X-IDAAS-REST-AGENT-AUTHORIZATION: UIDPASSWORD cred="... <token value> ..."'
Parameters:
appId - is Application Profile ID for key X-IDAAS-REST-AUTHORIZATION.
CRH - is Applciation's Client Registration Handle which is obtained through Registration Application step for key X-IDAAS-REST-AUTHORIZATION.
agentAppId - is Agent Application Profile ID for key X-IDAAS-REST-AGENT-AUTHORIZATION.
agentCRH - is Agent Application's Client Registration Handle which is obtained through Registration Application step. It is for key X-IDAAS-REST-AGENT-AUTHORIZATION.
Returns:
headers contains Map with key
Throws:
OICClientException

Skip navigation links

Copyright (c) 2012,
Oracle All Rights Reserved.
Built 06/05/2012 17:18:07 PDT