Interface RestAuthenticator
- 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 specificRestRequest
for authentication.default void
close()
default void
init
(RestServer restServer) Invoked by theRestServer
on startup.default boolean
Returns 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 specificRestRequest
for authentication.- Parameters:
request
- Request to be challenged.- Returns:
- a
RestResponse
wrapped in aCompletionStage
-
init
Invoked by theRestServer
on 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-