Class GetTokenRequest.Builder

All Implemented Interfaces:
WithJson<GetTokenRequest.Builder>, ObjectBuilder<GetTokenRequest>
Enclosing class:
GetTokenRequest

public static class GetTokenRequest.Builder extends RequestBase.AbstractBuilder<GetTokenRequest.Builder> implements ObjectBuilder<GetTokenRequest>
Builder for GetTokenRequest.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • grantType

      public final GetTokenRequest.Builder grantType(@Nullable AccessTokenGrantType value)
      The type of grant. Supported grant types are: password, _kerberos, client_credentials, and refresh_token.

      API name: grant_type

    • kerberosTicket

      public final GetTokenRequest.Builder kerberosTicket(@Nullable String value)
      The base64 encoded kerberos ticket. If you specify the _kerberos grant type, this parameter is required. This parameter is not valid with any other supported grant type.

      API name: kerberos_ticket

    • password

      public final GetTokenRequest.Builder password(@Nullable String value)
      The user's password. If you specify the password grant type, this parameter is required. This parameter is not valid with any other supported grant type.

      API name: password

    • refreshToken

      public final GetTokenRequest.Builder refreshToken(@Nullable String value)
      The string that was returned when you created the token, which enables you to extend its life. If you specify the refresh_token grant type, this parameter is required. This parameter is not valid with any other supported grant type.

      API name: refresh_token

    • scope

      public final GetTokenRequest.Builder scope(@Nullable String value)
      The scope of the token. Currently tokens are only issued for a scope of FULL regardless of the value sent with the request.

      API name: scope

    • username

      public final GetTokenRequest.Builder username(@Nullable String value)
      The username that identifies the user. If you specify the password grant type, this parameter is required. This parameter is not valid with any other supported grant type.

      API name: username

    • self

      protected GetTokenRequest.Builder self()
      Specified by:
      self in class RequestBase.AbstractBuilder<GetTokenRequest.Builder>
    • build

      public GetTokenRequest build()
      Builds a GetTokenRequest.
      Specified by:
      build in interface ObjectBuilder<GetTokenRequest>
      Throws:
      NullPointerException - if some of the required fields are null.