public interface AuthenticationServer extends io.grpc.BindableService, Closeable
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,
AuthenticatedChannelServerDriver saslDriver)
Registers new user against given channel.
|
void |
unregisterChannel(UUID channelId)
Unregisters given channel.
|
void registerChannel(UUID channelId, AuthenticatedUserInfo userInfo, AuthenticatedChannelServerDriver saslDriver)
channelId
- channel iduserInfo
- authanticated user infosaslDriver
- sasl server driverAuthenticatedUserInfo getUserInfoForChannel(UUID channelId) throws UnauthenticatedException
channelId
- channel idUnauthenticatedException
- if given channel is not registeredvoid unregisterChannel(UUID channelId)
channelId
- channel idSaslServerHandler createSaslHandler(ChannelAuthenticationScheme scheme) throws SaslException
scheme
- the authentication schemeSaslServerHandler
instanceSaslException
void close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
IOException
Copyright © 2023. All Rights Reserved.