Package com.smartgwt.client.types

# Enum RESTAuthenticationType

java.lang.Object
java.lang.Enum<RESTAuthenticationType>
com.smartgwt.client.types.RESTAuthenticationType

All Implemented Interfaces:
  `ValueEnum`, `Serializable`, `Comparable<RESTAuthenticationType>`, `Constable`

public enum RESTAuthenticationType extends Enum<RESTAuthenticationType> implements ValueEnum
Enumeration of the supported authentication types for the `RestConnector` implementation. Note, all of these authentication types are secure, but only if you use HTTPS

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `AUTHHEADER`
  Use a manually-constructed HTTP Authorization header.
  `BASIC`
  Use a "Basic" HTTP Authorization header.
  `BEARERTOKEN`
  Use a "Bearer" HTTP Authorization header with a bearer token obtained from an OAuth 2.0 client credentials server or other auth scheme that can generate bearer tokens (also known as API tokens or API keys).

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getValue()`
  `static RESTAuthenticationType`
  `valueOf(String name)`
  Returns the enum constant of this type with the specified name.
  `static RESTAuthenticationType[]`
  `values()`
  Returns an array containing the constants of this enum type, in the order they are declared.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### BASIC

    public static final RESTAuthenticationType BASIC
    Use a "Basic" HTTP Authorization header. Requires both a `username` and a `password`, which are combined and Base64-encoded in the HTTP request header. Note, you can also use this auth type for services that allow for Basic authentication using a combination of user and long-lived API key (ie, an API key or token that is generated by the auth server and is used instead of a password for this particular client application, but does not need to be regularly renewed)

    If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "basic".

  - ### BEARERTOKEN

    public static final RESTAuthenticationType BEARERTOKEN
    Use a "Bearer" HTTP Authorization header with a bearer token obtained from an OAuth 2.0 client credentials server or other auth scheme that can generate bearer tokens (also known as API tokens or API keys). This auth type can handle both long-lived tokens, such as API keys that are generated once for an application and never change, and so-called "access tokens" that are only valid for a limited period of time - usually no more than a few hours - and must be refreshed when they expire. See `RESTAuthentication.dataSource`

    If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "bearerToken".

  - ### AUTHHEADER

    public static final RESTAuthenticationType AUTHHEADER
    Use a manually-constructed HTTP Authorization header. This auth type requires an `authentication dataSource` that returns a record containing a well-formed Authorization header value in a field called "authorizationHeader" (this can be overridden, see the authentication dataSource docs mentioned above)

    If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "authHeader".

- ## Method Details

  - ### values

    public static RESTAuthenticationType[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.
    Returns:
      an array containing the constants of this enum type, in the order they are declared

  - ### valueOf

    public static RESTAuthenticationType valueOf(String name)
    Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum type has no constant with the specified name
      `NullPointerException` - if the argument is null

  - ### getValue

    public String getValue()
    Specified by:
      `getValue` in interface `ValueEnum`