Class UmaClient

java.lang.Object
com.inrupt.client.uma.UmaClient

public class UmaClient extends Object
An UMA client implmentation.
  • Constructor Details

    • UmaClient

      public UmaClient()
      Create a new UMA client using a default-configured HTTP client.
    • UmaClient

      public UmaClient(int maxIterations)
    • UmaClient

      public UmaClient(HttpService httpClient, int maxIterations)
      Create an UMA client using an externally-configured HTTP client.
      Parameters:
      httpClient - the externally configured HTTP client
      maxIterations - 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 client
      metadataCache - the externally configured metadata cache
      maxIterations - the maximum number of claims gathering stages
  • Method Details

    • metadata

      public CompletionStage<Metadata> metadata(URI authorizationServer)
      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 endpoint
      tokenRequest - the token request data
      claimMapper - a mapping function for interactive claim gathering
      Returns:
      the next stage of completion, containing the token response