Package org.apache.sshd.client.auth
Enum BuiltinUserAuthFactories
- All Implemented Interfaces:
Serializable
,Comparable<BuiltinUserAuthFactories>
,java.lang.constant.Constable
,Supplier<UserAuthFactory>
,Factory<UserAuthFactory>
,NamedFactory<UserAuthFactory>
,NamedResource
public enum BuiltinUserAuthFactories
extends Enum<BuiltinUserAuthFactories>
implements NamedFactory<UserAuthFactory>
Provides a centralized location for the default built-in authentication factories
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final UserAuthFactory
static final Set<BuiltinUserAuthFactories>
Fields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate()
static UserAuthFactory
fromFactoryName
(String name) getName()
parseFactoriesList
(String factories) parseFactoriesList
(String... factories) parseFactoriesList
(Collection<String> factories) static UserAuthFactory
resolveFactory
(String name) static BuiltinUserAuthFactories
Returns the enum constant of this type with the specified name.static BuiltinUserAuthFactories[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
PASSWORD
-
PUBLICKEY
-
KBINTERACTIVE
-
HOSTBASED
-
-
Field Details
-
VALUES
-
factory
-
-
Constructor Details
-
BuiltinUserAuthFactories
-
-
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
-
create
- Specified by:
create
in interfaceFactory<UserAuthFactory>
- Returns:
- A new instance
-
getName
- Specified by:
getName
in interfaceNamedResource
- Returns:
- The resource name
-
fromFactoryName
- Parameters:
name
- The factory name (case insensitive) - ignored ifnull
/empty- Returns:
- The matching factory instance -
null
if no match found
-
parseFactoriesList
- Parameters:
factories
- A comma-separated list of factories' names - ignored ifnull
/empty- Returns:
- A
BuiltinUserAuthFactories.ParseResult
containing the successfully parsed factories and the unknown ones. Note: it is up to caller to ensure that the lists do not contain duplicates
-
parseFactoriesList
-
parseFactoriesList
-
resolveFactory
-