Enum CredentialsMethod
- java.lang.Object
-
- java.lang.Enum<CredentialsMethod>
-
- dev.openfga.sdk.api.configuration.CredentialsMethod
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<CredentialsMethod>
public enum CredentialsMethod extends java.lang.Enum<CredentialsMethod>
Mutually exclusive methods for delivering credentials.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description API_TOKENA static API token.CLIENT_CREDENTIALSOAuth2 client credentials that can be used to acquire an OAuth2 access token.NONENo credentials.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CredentialsMethodvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static CredentialsMethod[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final CredentialsMethod NONE
No credentials.
-
API_TOKEN
public static final CredentialsMethod API_TOKEN
A static API token. In OAuth2 terms, this indicates an "access token" that will be used to make a request. When used as part ofConfigurationthen anApiTokenshould also be defined.
-
CLIENT_CREDENTIALS
public static final CredentialsMethod CLIENT_CREDENTIALS
OAuth2 client credentials that can be used to acquire an OAuth2 access token. When used as part ofConfigurationthen aClientCredentialsshould also be defined.
-
-
Method Detail
-
values
public static CredentialsMethod[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CredentialsMethod c : CredentialsMethod.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CredentialsMethod valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-