Class AuthTokenRequest.Builder

  • Enclosing class:
    AuthTokenRequest

    public static final class AuthTokenRequest.Builder
    extends java.lang.Object
    • Method Detail

      • grantType

        public AuthTokenRequest.Builder grantType​(GrantType grantType)
        The type of grant being requested.

        - `client_credentials`: A grant type used by clients to obtain an access token - `refresh_token`: A grant type used by clients to obtain a new access token using a refresh token

      • clientId

        public AuthTokenRequest.Builder clientId​(java.lang.String clientId)
        Client ID can be provided here in the body, or as the Username in HTTP Basic Auth.
      • clientId

        public AuthTokenRequest.Builder clientId​(java.util.Optional<java.lang.String> clientId)
        Client ID can be provided here in the body, or as the Username in HTTP Basic Auth.
      • clientSecret

        public AuthTokenRequest.Builder clientSecret​(java.lang.String clientSecret)
        Client secret can be provided here in the body, or as the Password in HTTP Basic Auth.
      • clientSecret

        public AuthTokenRequest.Builder clientSecret​(java.util.Optional<java.lang.String> clientSecret)
        Client secret can be provided here in the body, or as the Password in HTTP Basic Auth.
      • scope

        public AuthTokenRequest.Builder scope​(java.lang.String scope)
        A space delimited list of scopes. Required when `grant_type` is `client_credentials`.
      • scope

        public AuthTokenRequest.Builder scope​(java.util.Optional<java.lang.String> scope)
        A space delimited list of scopes. Required when `grant_type` is `client_credentials`.
      • refreshToken

        public AuthTokenRequest.Builder refreshToken​(java.lang.String refreshToken)
        The refresh_token returned alongside the access token being refreshed. Required when `grant_type` is `refresh_token`.
      • refreshToken

        public AuthTokenRequest.Builder refreshToken​(java.util.Optional<java.lang.String> refreshToken)
        The refresh_token returned alongside the access token being refreshed. Required when `grant_type` is `refresh_token`.