public interface UserAuth extends ClientSessionHolder, UserAuthInstance<ClientSession>
BY_NAME_COMPARATOR, NAME_EXTRACTOR
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Called to release any allocated resources
|
void |
init(ClientSession session,
String service) |
boolean |
process(Buffer buffer) |
default void |
signalAuthMethodFailure(ClientSession session,
String service,
boolean partial,
List<String> serverMethods,
Buffer buffer)
Signals reception of
SSH_MSG_USERAUTH_FAILURE message |
default void |
signalAuthMethodSuccess(ClientSession session,
String service,
Buffer buffer)
Signal reception of
SSH_MSG_USERAUTH_SUCCESS message |
getClientSession
getSession
findByName, findFirstMatchByName, getName, getNameList, getNames, ofName, removeByName, safeCompareByName
void init(ClientSession session, String service) throws Exception
session
- The ClientSession
service
- The requesting service nameException
- If failed to initialize the mechanismboolean process(Buffer buffer) throws Exception
buffer
- The Buffer
to process - null
if not a response buffer, i.e., the underlying
authentication mechanism should initiate whatever challenge/response mechanism is requiredtrue
if request handled - false
if the next authentication mechanism should be
usedException
- If failed to process the requestdefault void signalAuthMethodSuccess(ClientSession session, String service, Buffer buffer) throws Exception
SSH_MSG_USERAUTH_SUCCESS
messagesession
- The ClientSession
service
- The requesting service namebuffer
- The Buffer
containing the success message (after having consumed the relevant data from
it)Exception
- If failed to handle the callback - Note: may cause session closedefault void signalAuthMethodFailure(ClientSession session, String service, boolean partial, List<String> serverMethods, Buffer buffer) throws Exception
SSH_MSG_USERAUTH_FAILURE
messagesession
- The ClientSession
service
- The requesting service namepartial
- true
if some partial authentication success so farserverMethods
- The List
of authentication methods that can continuebuffer
- The Buffer
containing the failure message (after having consumed the relevant data
from it)Exception
- If failed to handle the callback - Note: may cause session closevoid destroy()
Copyright © 2008–2024 The Apache Software Foundation. All rights reserved.