public enum RESTAuthenticationType extends java.lang.Enum<RESTAuthenticationType> implements ValueEnum
RestConnector
implementation. Note, all of these authentication types are secure, but only if you use HTTPSEnum Constant and 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).
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getValue() |
static RESTAuthenticationType |
valueOf(java.lang.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.
|
public static final RESTAuthenticationType BASIC
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".
public static final RESTAuthenticationType BEARERTOKEN
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".
public static final RESTAuthenticationType AUTHHEADER
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".
public static RESTAuthenticationType[] values()
for (RESTAuthenticationType c : RESTAuthenticationType.values()) System.out.println(c);
public static RESTAuthenticationType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null