public class ServerUserAuthService extends AbstractCloseable implements Service, ServerSessionHolder
AbstractCloseable.State| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
authMethod |
private java.util.List<java.util.List<java.lang.String>> |
authMethods |
private java.lang.String |
authService |
private java.lang.String |
authUserName |
private UserAuth |
currentAuth |
private int |
maxAuthRequests |
private int |
nbAuthRequests |
private ServerSession |
serverSession |
private java.util.List<NamedFactory<UserAuth>> |
userAuthFactories |
private WelcomeBannerPhase |
welcomePhase |
private java.util.concurrent.atomic.AtomicBoolean |
welcomeSent |
closeFuture, lock, statelogCLOSE_WAIT_TIMEOUT, DEFAULT_CLOSE_WAIT_TIMEOUT| Constructor and Description |
|---|
ServerUserAuthService(Session s) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
asyncAuth(int cmd,
Buffer buffer,
boolean authed) |
ServerFactoryManager |
getFactoryManager() |
ServerSession |
getServerSession() |
ServerSession |
getSession() |
WelcomeBannerPhase |
getWelcomePhase() |
protected void |
handleAuthenticationFailure(int cmd,
Buffer buffer) |
protected void |
handleAuthenticationInProgress(int cmd,
Buffer buffer) |
protected void |
handleAuthenticationSuccess(int cmd,
Buffer buffer) |
protected java.lang.String |
loadWelcomeBanner(ServerSession session,
java.net.URL url,
java.nio.charset.Charset cs) |
void |
process(int cmd,
Buffer buffer)
Service the request.
|
protected java.lang.String |
resolveWelcomeBanner(ServerSession session) |
IoWriteFuture |
sendWelcomeBanner(ServerSession session)
Sends the welcome banner (if any configured) and if not already invoked
|
void |
start() |
addCloseFutureListener, builder, close, doCloseGracefully, doCloseImmediately, isClosed, isClosing, preClose, removeCloseFutureListenergetSimplifiedLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddCloseFutureListener, close, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListenerprivate final ServerSession serverSession
private final java.util.concurrent.atomic.AtomicBoolean welcomeSent
private final WelcomeBannerPhase welcomePhase
private java.util.List<NamedFactory<UserAuth>> userAuthFactories
private java.util.List<java.util.List<java.lang.String>> authMethods
private java.lang.String authUserName
private java.lang.String authMethod
private java.lang.String authService
private UserAuth currentAuth
private int maxAuthRequests
private int nbAuthRequests
public ServerUserAuthService(Session s) throws java.io.IOException
java.io.IOExceptionpublic WelcomeBannerPhase getWelcomePhase()
public ServerSession getSession()
getSession in interface Servicepublic ServerSession getServerSession()
getServerSession in interface ServerSessionHolderServerSession usedpublic void process(int cmd,
Buffer buffer)
throws java.lang.Exception
Serviceprotected void asyncAuth(int cmd,
Buffer buffer,
boolean authed)
protected void handleAuthenticationInProgress(int cmd,
Buffer buffer)
throws java.lang.Exception
java.lang.Exceptionprotected void handleAuthenticationSuccess(int cmd,
Buffer buffer)
throws java.lang.Exception
java.lang.Exceptionprotected void handleAuthenticationFailure(int cmd,
Buffer buffer)
throws java.lang.Exception
java.lang.Exceptionpublic IoWriteFuture sendWelcomeBanner(ServerSession session) throws java.io.IOException
session - The ServerSession to send the welcome banner toIoWriteFuture - null if none sentjava.io.IOException - If failed to send the bannerprotected java.lang.String resolveWelcomeBanner(ServerSession session) throws java.io.IOException
java.io.IOExceptionprotected java.lang.String loadWelcomeBanner(ServerSession session, java.net.URL url, java.nio.charset.Charset cs) throws java.io.IOException
java.io.IOExceptionpublic ServerFactoryManager getFactoryManager()