Class AuthTokenRequest


  • public class AuthTokenRequest
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      AuthTokenRequest​(GrantType grantType)  
      AuthTokenRequest​(GrantType grantType, java.util.Optional<java.lang.String> clientId, java.util.Optional<java.lang.String> clientSecret, java.util.Optional<java.lang.String> scope, java.util.Optional<java.lang.String> refreshToken)  
    • Constructor Detail

      • AuthTokenRequest

        public AuthTokenRequest​(GrantType grantType,
                                java.util.Optional<java.lang.String> clientId,
                                java.util.Optional<java.lang.String> clientSecret,
                                java.util.Optional<java.lang.String> scope,
                                java.util.Optional<java.lang.String> refreshToken)
      • AuthTokenRequest

        public AuthTokenRequest​(GrantType grantType)
    • Method Detail

      • grantType

        public 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 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 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 java.util.Optional<java.lang.String> scope()
        A space delimited list of scopes. Required when `grant_type` is `client_credentials`.
      • refreshToken

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

        public AuthTokenRequest withGrantType​(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

      • withClientId

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

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

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

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

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

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

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

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

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object