Class AuthenticationDataHttp
java.lang.Object
org.apache.pulsar.broker.authentication.AuthenticationDataHttp
- All Implemented Interfaces:
AuthenticationDataSource
- Direct Known Subclasses:
AuthenticationDataHttps
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SocketAddressprotected final javax.servlet.http.HttpServletRequestprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetHttpHeader(String name) Subscription name can be necessary for consumption.booleanCheck if data from HTTP are available.booleanCheck if data from peer are available.booleanCheck if subscription is defined available.voidsetSubscription(String subscription) Subscription name can be necessary for consumption.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pulsar.broker.authentication.AuthenticationDataSource
authenticate, getCommandData, getTlsCertificates, hasDataFromCommand, hasDataFromTls
-
Field Details
-
request
protected final javax.servlet.http.HttpServletRequest request -
remoteAddress
-
subscription
-
-
Constructor Details
-
AuthenticationDataHttp
public AuthenticationDataHttp(javax.servlet.http.HttpServletRequest request)
-
-
Method Details
-
hasDataFromHttp
public boolean hasDataFromHttp()Description copied from interface:AuthenticationDataSourceCheck if data from HTTP are available.- Specified by:
hasDataFromHttpin interfaceAuthenticationDataSource- Returns:
- true if this authentication data contain data from HTTP
-
getHttpAuthType
- Specified by:
getHttpAuthTypein interfaceAuthenticationDataSource- Returns:
- a authentication scheme, or
nullif the request is not be authenticated.
-
getHttpHeader
- Specified by:
getHttpHeaderin interfaceAuthenticationDataSource- Returns:
- a
Stringcontaining the value of the specified header, ornullif the header does not exist.
-
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
- Specified by:
getPeerAddressin interfaceAuthenticationDataSource- Returns:
- a
Stringcontaining the IP address of the client
-
hasSubscription
public boolean hasSubscription()Description copied from interface:AuthenticationDataSourceCheck if subscription is defined available.- Specified by:
hasSubscriptionin interfaceAuthenticationDataSource- Returns:
- true if this authentication data contain subscription
-
setSubscription
Description copied from interface:AuthenticationDataSourceSubscription name can be necessary for consumption.- Specified by:
setSubscriptionin interfaceAuthenticationDataSource
-
getSubscription
Description copied from interface:AuthenticationDataSourceSubscription name can be necessary for consumption.- Specified by:
getSubscriptionin interfaceAuthenticationDataSource- Returns:
- a
Stringcontaining the subscription name
-