public interface AuthenticationServer
extends io.grpc.BindableService
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the server, releases all authentication sessions.
|
SaslServerHandler |
createSaslHandler(ChannelAuthenticationScheme scheme)
Creates server-side Sasl handler for given scheme.
|
AuthenticatedUserInfo |
getUserInfoForChannel(UUID channelId) |
void |
registerChannel(UUID channelId,
AuthenticatedUserInfo userInfo,
SaslStreamServerDriver saslDriver)
Registers new user against given channel.
|
boolean |
unregisterChannel(UUID channelId)
Unregisters given channel.
|
void registerChannel(UUID channelId, AuthenticatedUserInfo userInfo, SaslStreamServerDriver saslDriver)
channelId
- channel iduserInfo
- authanticated user infosaslDriver
- sasl server driverAuthenticatedUserInfo getUserInfoForChannel(UUID channelId) throws UnauthenticatedException
channelId
- channel idUnauthenticatedException
- if given channel is not registeredboolean unregisterChannel(UUID channelId)
channelId
- channel idtrue
if channel was registeredSaslServerHandler createSaslHandler(ChannelAuthenticationScheme scheme) throws SaslException, UnauthenticatedException
scheme
- the authentication schemeSaslServerHandler
instanceSaslException
UnauthenticatedException
void close()
Copyright © 2023. All Rights Reserved.