Package com.inrupt.client.uma
Class UmaClient
java.lang.Object
com.inrupt.client.uma.UmaClient
An UMA client implmentation.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new UMA client using a default-configured HTTP client.UmaClient
(int maxIterations) UmaClient
(HttpService httpClient, int maxIterations) Create an UMA client using an externally-configured HTTP client.UmaClient
(HttpService httpClient, ClientCache<URI, Metadata> metadataCache, int maxIterations) Create an UMA client using an externally-configured HTTP client and cache. -
Method Summary
Modifier and TypeMethodDescriptionFetch the UMA metadata resource.token
(URI tokenEndpoint, TokenRequest tokenRequest, Function<NeedInfo, CompletionStage<ClaimToken>> claimMapper) Fetch the UMA token resource.
-
Constructor Details
-
UmaClient
public UmaClient()Create a new UMA client using a default-configured HTTP client. -
UmaClient
public UmaClient(int maxIterations) -
UmaClient
Create an UMA client using an externally-configured HTTP client.- Parameters:
httpClient
- the externally configured HTTP clientmaxIterations
- the maximum number of claims gathering stages
-
UmaClient
public UmaClient(HttpService httpClient, ClientCache<URI, Metadata> metadataCache, int maxIterations) Create an UMA client using an externally-configured HTTP client and cache.- Parameters:
httpClient
- the externally configured HTTP clientmetadataCache
- the externally configured metadata cachemaxIterations
- the maximum number of claims gathering stages
-
-
Method Details
-
metadata
Fetch the UMA metadata resource.- Parameters:
authorizationServer
- the authorization server URI- Returns:
- the next stage of completion, containing the authorization server discovery metadata
-
token
public CompletionStage<TokenResponse> token(URI tokenEndpoint, TokenRequest tokenRequest, Function<NeedInfo, CompletionStage<ClaimToken>> claimMapper) Fetch the UMA token resource.- Parameters:
tokenEndpoint
- the token endpointtokenRequest
- the token request dataclaimMapper
- a mapping function for interactive claim gathering- Returns:
- the next stage of completion, containing the token response
-