Interface Authenticator
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
BasicAuthenticator,ClientCertAuthenticator
Authentication mechanism.
- Author:
- Sebastian Ćaskawiec
-
Method Summary
Modifier and TypeMethodDescriptionchallenge(RestRequest request, io.netty.channel.ChannelHandlerContext ctx) Challenges specificRestRequestfor authentication.default voidclose()default voidinit(RestServer restServer) Invoked by theRestServeron startup.default booleanReturns whether the realm backing this authenticator is ready to authenticate users
-
Method Details
-
challenge
CompletionStage<RestResponse> challenge(RestRequest request, io.netty.channel.ChannelHandlerContext ctx) Challenges specificRestRequestfor authentication.- Parameters:
request- Request to be challenged.- Returns:
- a
RestResponsewrapped in aCompletionStage
-
init
Invoked by theRestServeron startup. Can perform additional configuration- Parameters:
restServer-
-
isReadyForHttpChallenge
default boolean isReadyForHttpChallenge()Returns whether the realm backing this authenticator is ready to authenticate users- Returns:
- a boolean indicating whether the real is empty (i.e. has no users)
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-