Class TokenRequest.Builder

java.lang.Object
com.inrupt.client.openid.TokenRequest.Builder
Enclosing class:
TokenRequest

public static class TokenRequest.Builder extends Object
A builder class for TokenRequest objects.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • clientSecret

      public TokenRequest.Builder clientSecret(String clientSecret)
      Set the client secret value.
      Parameters:
      clientSecret - the client secret
      Returns:
      this builder
    • codeVerifier

      public TokenRequest.Builder codeVerifier(String codeVerifier)
      Set the PKCE code verifier for the token endpoint.
      Parameters:
      codeVerifier - the code verifier
      Returns:
      this builder
    • scopes

      public TokenRequest.Builder scopes(String... scopes)
      Set one or more scope values.
      Parameters:
      scopes - the scope values
      Returns:
      this builder
    • issuer

      public TokenRequest.Builder issuer(URI issuer)
      Set the issuer URI.
      Parameters:
      issuer - the issuer value
      Returns:
      this builder
    • authMethod

      public TokenRequest.Builder authMethod(String authMethod)
      Set the authentication method for the token endpoint.
      Parameters:
      authMethod - the authentication method
      Returns:
      this builder
    • code

      public TokenRequest.Builder code(String code)
      Set the authorization code value.
      Parameters:
      code - the authorization code
      Returns:
      this builder
    • redirectUri

      public TokenRequest.Builder redirectUri(URI redirectUri)
      Set the redirect URI value.
      Parameters:
      redirectUri - the redirect URI
      Returns:
      this builder
    • build

      public TokenRequest build(String grantType, String clientId)
      Build a token request.
      Parameters:
      grantType - the grant type
      clientId - the client id
      Returns:
      the token request