Class TokenClientIdRetriever
java.lang.Object
org.forgerock.openig.fapi.token.apiclient.TokenClientIdRetriever
- All Implemented Interfaces:
ClientIdRetriever
Implementation of
ClientIdRetriever for /token endpoint.
The Response is expected to be a successful token endpoint response, and contain a json payload with an access_token
from which the client_id will be retrieved.
-
Constructor Summary
ConstructorsConstructorDescriptionTokenClientIdRetriever(AccessTokenResolver accessTokenResolver, String accessTokenClientIdClaim) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionretrieveClientId(Context context, Request request, Response response) Retrieve theclient_idfrom the given parameters.
-
Constructor Details
-
TokenClientIdRetriever
public TokenClientIdRetriever(AccessTokenResolver accessTokenResolver, String accessTokenClientIdClaim) Default constructor.- Parameters:
accessTokenResolver- theaccess_tokenresolver used to retrieve token infoaccessTokenClientIdClaim- the claim to find the client_id
-
-
Method Details
-
retrieveClientId
public Promise<String,ClientIdRetrieverException> retrieveClientId(Context context, Request request, Response response) Description copied from interface:ClientIdRetrieverRetrieve theclient_idfrom the given parameters.- Specified by:
retrieveClientIdin interfaceClientIdRetriever- Parameters:
context- theContextto userequest- theRequestto useresponse- theResponseto use- Returns:
Promisewith the retrievedclient_idor empty if none.
-