Package com.smartgwt.client.types
Enum RESTAuthenticationType
- All Implemented Interfaces:
ValueEnum
,Serializable
,Comparable<RESTAuthenticationType>
,Constable
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 ConstantDescriptionUse a manually-constructed HTTP Authorization header.Use a "Basic" HTTP Authorization header.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 TypeMethodDescriptiongetValue()
static RESTAuthenticationType
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.
-
Enum Constant Details
-
BASIC
Use a "Basic" HTTP Authorization header. Requires both ausername
and apassword
, 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
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. SeeRESTAuthentication.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
Use a manually-constructed HTTP Authorization header. This auth type requires anauthentication 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
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
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 nameNullPointerException
- if the argument is null
-
getValue
-