Package org.apache.sshd.common.auth
Interface UserAuthMethodFactory<S extends SessionContext,M extends UserAuthInstance<S>>
- Type Parameters:
S
- The type ofSessionContext
being provided to the instance creatorM
- The authentication method factory type
- All Superinterfaces:
NamedResource
- All Known Subinterfaces:
UserAuthFactory
,UserAuthFactory
- All Known Implementing Classes:
AbstractUserAuthFactory
,AbstractUserAuthFactory
,AbstractUserAuthMethodFactory
,UserAuthGSSFactory
,UserAuthHostBasedFactory
,UserAuthHostBasedFactory
,UserAuthKeyboardInteractiveFactory
,UserAuthKeyboardInteractiveFactory
,UserAuthNoneFactory
,UserAuthPasswordFactory
,UserAuthPasswordFactory
,UserAuthPublicKeyFactory
,UserAuthPublicKeyFactory
public interface UserAuthMethodFactory<S extends SessionContext,M extends UserAuthInstance<S>>
extends NamedResource
Represents a user authentication method
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Host-based authentication methodstatic final String
Keyboard interactive authentication methodstatic final String
Password authentication method namestatic final String
Public key authentication method nameFields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR
-
Method Summary
Modifier and TypeMethodDescriptioncreateUserAuth
(S session) static <S extends SessionContext,
M extends UserAuthInstance<S>>
McreateUserAuth
(S session, Collection<? extends UserAuthMethodFactory<S, M>> factories, String name) static boolean
static boolean
According to RFC 4252 - section 8:Methods inherited from interface org.apache.sshd.common.NamedResource
getName
-
Field Details
-
PASSWORD
Password authentication method name- See Also:
-
PUBLIC_KEY
Public key authentication method name- See Also:
-
KB_INTERACTIVE
Keyboard interactive authentication method- See Also:
-
HOST_BASED
Host-based authentication method- See Also:
-
-
Method Details
-
createUserAuth
- Parameters:
session
- The session for which authentication is required- Returns:
- The authenticator instance
- Throws:
IOException
- If failed to create the instance
-
createUserAuth
static <S extends SessionContext,M extends UserAuthInstance<S>> M createUserAuth(S session, Collection<? extends UserAuthMethodFactory<S, M>> factories, String name) throws IOException- Type Parameters:
S
- The type ofSessionContext
being provided to the instance creatorM
- The authentication method factory type- Parameters:
session
- The session through which the request is being madefactories
- The available factoriesname
- The requested factory name- Returns:
- The created authenticator instance -
null
if no matching factory - Throws:
IOException
- If failed to create the instance
-
isSecureAuthenticationTransport
According to RFC 4252 - section 8:Both the server and the client should check whether the underlying transport layer provides confidentiality (i.e., if encryption is being used). If no confidentiality is provided ("none" cipher), password authentication SHOULD be disabled. If there is no confidentiality or no MAC, password change SHOULD be disabled.
- Parameters:
session
- TheSessionContext
being used for authentication- Returns:
true
if the context is notnull
and the ciphers have been established to anything other than "none".- See Also:
-
isDataIntegrityAuthenticationTransport
- Parameters:
session
- TheSessionContext
being used for authentication- Returns:
true
if the context is notnull
and the MAC(s) used to verify packet integrity have been established.- See Also:
-