Class OneStageAuthenticationState
java.lang.Object
org.apache.pulsar.broker.authentication.OneStageAuthenticationState
- All Implemented Interfaces:
AuthenticationState
Interface for authentication state.
It tell broker whether the authentication is completed or not,
if completed, what is the AuthRole is.
-
Constructor Summary
ConstructorsConstructorDescriptionOneStageAuthenticationState(javax.servlet.http.HttpServletRequest request, AuthenticationProvider provider) OneStageAuthenticationState(org.apache.pulsar.common.api.AuthData authData, SocketAddress remoteAddress, SSLSession sslSession, AuthenticationProvider provider) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.pulsar.common.api.AuthDataauthenticate(org.apache.pulsar.common.api.AuthData authData) Challenge passed in auth data and get response data.Return AuthenticationDataSource.After the authentication between client and broker completed, get authentication role represent for the client.booleanWhether the authentication is completed or not.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.AuthenticationState
authenticateAsync, getStateId, isExpired, refreshAuthentication
-
Constructor Details
-
OneStageAuthenticationState
public OneStageAuthenticationState(org.apache.pulsar.common.api.AuthData authData, SocketAddress remoteAddress, SSLSession sslSession, AuthenticationProvider provider) throws AuthenticationException - Throws:
AuthenticationException
-
OneStageAuthenticationState
public OneStageAuthenticationState(javax.servlet.http.HttpServletRequest request, AuthenticationProvider provider) throws AuthenticationException - Throws:
AuthenticationException
-
-
Method Details
-
getAuthRole
Description copied from interface:AuthenticationStateAfter the authentication between client and broker completed, get authentication role represent for the client. It should throw exception if auth not complete.- Specified by:
getAuthRolein interfaceAuthenticationState
-
getAuthDataSource
Description copied from interface:AuthenticationStateReturn AuthenticationDataSource.- Specified by:
getAuthDataSourcein interfaceAuthenticationState
-
authenticate
public org.apache.pulsar.common.api.AuthData authenticate(org.apache.pulsar.common.api.AuthData authData) Description copied from interface:AuthenticationStateChallenge passed in auth data and get response data.- Specified by:
authenticatein interfaceAuthenticationState
-
isComplete
public boolean isComplete()Description copied from interface:AuthenticationStateWhether the authentication is completed or not.- Specified by:
isCompletein interfaceAuthenticationState
-