Package io.moov.sdk.models.components
Class AuthTokenRequest
- java.lang.Object
-
- io.moov.sdk.models.components.AuthTokenRequest
-
public class AuthTokenRequest extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAuthTokenRequest.Builder
-
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)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AuthTokenRequest.Builderbuilder()java.util.Optional<java.lang.String>clientId()Client ID can be provided here in the body, or as the Username in HTTP Basic Auth.java.util.Optional<java.lang.String>clientSecret()Client secret can be provided here in the body, or as the Password in HTTP Basic Auth.booleanequals(java.lang.Object o)GrantTypegrantType()The type of grant being requested.inthashCode()java.util.Optional<java.lang.String>refreshToken()The refresh_token returned alongside the access token being refreshed.java.util.Optional<java.lang.String>scope()A space delimited list of scopes.java.lang.StringtoString()AuthTokenRequestwithClientId(java.lang.String clientId)Client ID can be provided here in the body, or as the Username in HTTP Basic Auth.AuthTokenRequestwithClientId(java.util.Optional<java.lang.String> clientId)Client ID can be provided here in the body, or as the Username in HTTP Basic Auth.AuthTokenRequestwithClientSecret(java.lang.String clientSecret)Client secret can be provided here in the body, or as the Password in HTTP Basic Auth.AuthTokenRequestwithClientSecret(java.util.Optional<java.lang.String> clientSecret)Client secret can be provided here in the body, or as the Password in HTTP Basic Auth.AuthTokenRequestwithGrantType(GrantType grantType)The type of grant being requested.AuthTokenRequestwithRefreshToken(java.lang.String refreshToken)The refresh_token returned alongside the access token being refreshed.AuthTokenRequestwithRefreshToken(java.util.Optional<java.lang.String> refreshToken)The refresh_token returned alongside the access token being refreshed.AuthTokenRequestwithScope(java.lang.String scope)A space delimited list of scopes.AuthTokenRequestwithScope(java.util.Optional<java.lang.String> scope)A space delimited list of scopes.
-
-
-
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`.
-
builder
public static AuthTokenRequest.Builder builder()
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-