Class OpenIdProvider

java.lang.Object
com.inrupt.client.openid.OpenIdProvider

public class OpenIdProvider extends Object
A class for interacting with an OpenID Provider.
See Also:
  • Constructor Details

    • OpenIdProvider

      public OpenIdProvider(URI issuer, DPoP dpop)
      Create an OpenID Provider client.
      Parameters:
      issuer - the OpenID provider issuer
      dpop - the DPoP manager
    • OpenIdProvider

      public OpenIdProvider(URI issuer, DPoP dpop, HttpService httpClient)
      Create an OpenID Provider client.
      Parameters:
      issuer - the OpenID provider issuer
      dpop - the DPoP manager
      httpClient - an HTTP client
    • OpenIdProvider

      public OpenIdProvider(URI issuer, DPoP dpop, HttpService httpClient, ClientCache<URI,Metadata> metadataCache)
      Create an OpenID Provider client.
      Parameters:
      issuer - the OpenID provider issuer
      dpop - the DPoP manager
      httpClient - an HTTP client
      metadataCache - an OpenID Metadata cache
  • Method Details

    • metadata

      public CompletionStage<Metadata> metadata()
      Fetch the OpenID metadata resource.
      Returns:
      the next stage of completion, containing the OpenID Provider's metadata resource
    • authorize

      public CompletionStage<URI> authorize(AuthorizationRequest request)
      Construct the OpenID authorization URI asynchronously.
      Parameters:
      request - the authorization request
      Returns:
      the next stage of completion, containing URI for performing the authorization request
    • token

      public CompletionStage<TokenResponse> token(TokenRequest request)
      Interact asynchronously with the OpenID Provider's token endpoint.
      Parameters:
      request - the token request
      Returns:
      the next stage of completion, containing the token response
    • endSession

      public CompletionStage<URI> endSession(EndSessionRequest request)
      End the session asynchronously with the OpenID Provider.
      Parameters:
      request - the end session request
      Returns:
      a URI to which the app should be redirected, may be null if RP-initiated logout is not supported