Class AuthenticationDataCommand
- java.lang.Object
-
- org.apache.pulsar.broker.authentication.AuthenticationDataCommand
-
- All Implemented Interfaces:
AuthenticationDataSource
public class AuthenticationDataCommand extends java.lang.Object implements AuthenticationDataSource
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringauthDataprotected java.net.SocketAddressremoteAddressprotected javax.net.ssl.SSLSessionsslSession
-
Constructor Summary
Constructors Constructor Description AuthenticationDataCommand(java.lang.String authData)AuthenticationDataCommand(java.lang.String authData, java.net.SocketAddress remoteAddress, javax.net.ssl.SSLSession sslSession)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCommandData()java.net.SocketAddressgetPeerAddress()java.security.cert.Certificate[]getTlsCertificates()booleanhasDataFromCommand()Check if data from Pulsar protocol are available.booleanhasDataFromPeer()Check if data from peer are available.booleanhasDataFromTls()Check if data from TLS are available.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pulsar.broker.authentication.AuthenticationDataSource
authenticate, getHttpAuthType, getHttpHeader, getSubscription, hasDataFromHttp, hasSubscription, setSubscription
-
-
-
-
Method Detail
-
hasDataFromCommand
public boolean hasDataFromCommand()
Description copied from interface:AuthenticationDataSourceCheck if data from Pulsar protocol are available.- Specified by:
hasDataFromCommandin interfaceAuthenticationDataSource- Returns:
- true if this authentication data contain data from Pulsar protocol
-
getCommandData
public java.lang.String getCommandData()
- Specified by:
getCommandDatain interfaceAuthenticationDataSource- Returns:
- authentication data which is stored in a command
-
hasDataFromPeer
public boolean hasDataFromPeer()
Description copied from interface:AuthenticationDataSourceCheck if data from peer are available.- Specified by:
hasDataFromPeerin interfaceAuthenticationDataSource- Returns:
- true if this authentication data contain data from peer
-
getPeerAddress
public java.net.SocketAddress getPeerAddress()
- Specified by:
getPeerAddressin interfaceAuthenticationDataSource- Returns:
- a
Stringcontaining the IP address of the client
-
hasDataFromTls
public boolean hasDataFromTls()
Description copied from interface:AuthenticationDataSourceCheck if data from TLS are available.- Specified by:
hasDataFromTlsin interfaceAuthenticationDataSource- Returns:
- true if this authentication data contain data from TLS
-
getTlsCertificates
public java.security.cert.Certificate[] getTlsCertificates()
- Specified by:
getTlsCertificatesin interfaceAuthenticationDataSource- Returns:
- a client certificate chain, or null if the data are not available
-
-