public class SaslAuthenticationContext extends Object implements AuthenticationContext
Constructor and Description |
---|
SaslAuthenticationContext(long sessionId,
SaslServer server,
SecurityProtocol securityProtocol,
InetAddress clientAddress,
String listenerName) |
SaslAuthenticationContext(long sessionId,
SaslServer server,
SecurityProtocol securityProtocol,
InetAddress clientAddress,
String listenerName,
Optional<SSLSession> sslSession) |
SaslAuthenticationContext(SaslServer server,
SecurityProtocol securityProtocol,
InetAddress clientAddress,
String listenerName)
Method used for tests.
|
Modifier and Type | Method and Description |
---|---|
InetAddress |
clientAddress()
Address of the authenticated client
|
String |
listenerName()
Name of the listener used for the connection
|
SecurityProtocol |
securityProtocol()
Underlying security protocol of the authentication session.
|
SaslServer |
server() |
long |
sessionId()
Unique ID assigned to each connection
|
Optional<SSLSession> |
sslSession()
Returns SSL session for the connection if security protocol is SASL_SSL.
|
public SaslAuthenticationContext(long sessionId, SaslServer server, SecurityProtocol securityProtocol, InetAddress clientAddress, String listenerName)
public SaslAuthenticationContext(SaslServer server, SecurityProtocol securityProtocol, InetAddress clientAddress, String listenerName)
public SaslAuthenticationContext(long sessionId, SaslServer server, SecurityProtocol securityProtocol, InetAddress clientAddress, String listenerName, Optional<SSLSession> sslSession)
public SaslServer server()
public Optional<SSLSession> sslSession()
SSLSession.getPeerPrincipal()
.public SecurityProtocol securityProtocol()
AuthenticationContext
securityProtocol
in interface AuthenticationContext
public InetAddress clientAddress()
AuthenticationContext
clientAddress
in interface AuthenticationContext
public String listenerName()
AuthenticationContext
listenerName
in interface AuthenticationContext
public long sessionId()
AuthenticationContext
sessionId
in interface AuthenticationContext