Package io.moov.sdk.models.components
Class AuthTokenRequest.Builder
- java.lang.Object
-
- io.moov.sdk.models.components.AuthTokenRequest.Builder
-
- Enclosing class:
- AuthTokenRequest
public static final class AuthTokenRequest.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthTokenRequestbuild()AuthTokenRequest.BuilderclientId(java.lang.String clientId)Client ID can be provided here in the body, or as the Username in HTTP Basic Auth.AuthTokenRequest.BuilderclientId(java.util.Optional<java.lang.String> clientId)Client ID can be provided here in the body, or as the Username in HTTP Basic Auth.AuthTokenRequest.BuilderclientSecret(java.lang.String clientSecret)Client secret can be provided here in the body, or as the Password in HTTP Basic Auth.AuthTokenRequest.BuilderclientSecret(java.util.Optional<java.lang.String> clientSecret)Client secret can be provided here in the body, or as the Password in HTTP Basic Auth.AuthTokenRequest.BuildergrantType(GrantType grantType)The type of grant being requested.AuthTokenRequest.BuilderrefreshToken(java.lang.String refreshToken)The refresh_token returned alongside the access token being refreshed.AuthTokenRequest.BuilderrefreshToken(java.util.Optional<java.lang.String> refreshToken)The refresh_token returned alongside the access token being refreshed.AuthTokenRequest.Builderscope(java.lang.String scope)A space delimited list of scopes.AuthTokenRequest.Builderscope(java.util.Optional<java.lang.String> scope)A space delimited list of scopes.
-
-
-
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`.
-
build
public AuthTokenRequest build()
-
-