Package org.postgresql.core
Enum AuthMethod
- java.lang.Object
-
- java.lang.Enum<AuthMethod>
-
- org.postgresql.core.AuthMethod
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<AuthMethod>
public enum AuthMethod extends java.lang.Enum<AuthMethod>
Enumeration of PostgreSQL authentication methods.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcheckAuth(java.util.EnumSet<AuthMethod> allowedMethods, AuthMethod authMethod)static AuthMethodfromString(java.lang.String method)static java.util.EnumSet<AuthMethod>parseRequireAuth(java.lang.String requireAuth)static AuthMethodvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static AuthMethod[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final AuthMethod NONE
-
PASSWORD
public static final AuthMethod PASSWORD
-
MD5
public static final AuthMethod MD5
-
GSS
public static final AuthMethod GSS
-
SSPI
public static final AuthMethod SSPI
-
SCRAM_SHA_256
public static final AuthMethod SCRAM_SHA_256
-
-
Method Detail
-
values
public static AuthMethod[] 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 (AuthMethod c : AuthMethod.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AuthMethod 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
-
fromString
public static AuthMethod fromString(java.lang.String method) throws PSQLException
- Throws:
PSQLException
-
parseRequireAuth
public static java.util.EnumSet<AuthMethod> parseRequireAuth(java.lang.String requireAuth) throws PSQLException
- Throws:
PSQLException
-
checkAuth
public static void checkAuth(java.util.EnumSet<AuthMethod> allowedMethods, AuthMethod authMethod) throws PSQLException
- Throws:
PSQLException
-
-