Class AuthTokenResponse

java.lang.Object
com.qtsurfer.api.client.model.AuthTokenResponse

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.24.0") public class AuthTokenResponse extends Object
AuthTokenResponse
  • Field Details

  • Constructor Details

    • AuthTokenResponse

      public AuthTokenResponse()
  • Method Details

    • accessToken

      public AuthTokenResponse accessToken(@Nonnull String accessToken)
    • getAccessToken

      @Nonnull public String getAccessToken()
      Short-lived HS256 JWT. Send as `Authorization: Bearer <token>` on all other endpoints.
      Returns:
      accessToken
    • setAccessToken

      public void setAccessToken(@Nonnull String accessToken)
    • tokenType

      public AuthTokenResponse tokenType(@Nonnull AuthTokenResponse.TokenTypeEnum tokenType)
    • getTokenType

      @Nonnull public AuthTokenResponse.TokenTypeEnum getTokenType()
      Always `Bearer`.
      Returns:
      tokenType
    • setTokenType

      public void setTokenType(@Nonnull AuthTokenResponse.TokenTypeEnum tokenType)
    • expiresIn

      public AuthTokenResponse expiresIn(@Nonnull Integer expiresIn)
    • getExpiresIn

      @Nonnull public Integer getExpiresIn()
      Seconds until the JWT expires (typically 3600).
      Returns:
      expiresIn
    • setExpiresIn

      public void setExpiresIn(@Nonnull Integer expiresIn)
    • scopes

      public AuthTokenResponse scopes(@Nullable Map<String,List<String>> scopes)
    • putScopesItem

      public AuthTokenResponse putScopesItem(String key, List<String> scopesItem)
    • getScopes

      @Nullable public Map<String,List<String>> getScopes()
      What your API key may do, as a map from a resource to the actions allowed on it. Names are lower case: `{ \"backtests\": [\"read\", \"write\", \"execute\"], \"exchanges\": [\"read\"] }`. A scope is a resource and an action: a resource is listed only with at least one action, and a key with no scope is `{}`. `GET /account` and `POST /auth/token` return the same map for the same key. An operation that needs a scope the key does not carry is answered `403` with the code `insufficient_scope`, and says which scope it needed.
      Returns:
      scopes
    • setScopes

      public void setScopes(@Nullable Map<String,List<String>> scopes)
    • tier

      public AuthTokenResponse tier(@Nonnull AuthTokenResponse.TierEnum tier)
    • getTier

      @Nonnull public AuthTokenResponse.TierEnum getTier()
      Subscription tier this token was issued for. Drives rate limits and feature flags on downstream endpoints.
      Returns:
      tier
    • setTier

      public void setTier(@Nonnull AuthTokenResponse.TierEnum tier)
    • equals

      public boolean equals(Object o)
      Return true if this AuthTokenResponse object is equal to o.
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object
    • toUrlQueryString

      public String toUrlQueryString()
      Convert the instance into URL query string.
      Returns:
      URL query string
    • toUrlQueryString

      public String toUrlQueryString(String prefix)
      Convert the instance into URL query string.
      Parameters:
      prefix - prefix of the query string
      Returns:
      URL query string