Class OneStageAuthenticationState
- java.lang.Object
-
- org.apache.pulsar.broker.authentication.OneStageAuthenticationState
-
- All Implemented Interfaces:
AuthenticationState
public class OneStageAuthenticationState extends java.lang.Object implements AuthenticationState
Interface for authentication state. It tell broker whether the authentication is completed or not, if completed, what is the AuthRole is.
-
-
Constructor Summary
Constructors Constructor Description OneStageAuthenticationState(org.apache.pulsar.common.api.AuthData authData, java.net.SocketAddress remoteAddress, javax.net.ssl.SSLSession sslSession, AuthenticationProvider provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.pulsar.common.api.AuthDataauthenticate(org.apache.pulsar.common.api.AuthData authData)Challenge passed in auth data and get response data.AuthenticationDataSourcegetAuthDataSource()Return AuthenticationDataSource.java.lang.StringgetAuthRole()After the authentication between client and broker completed, get authentication role represent for the client.booleanisComplete()Whether the authentication is completed or not.-
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.AuthenticationState
getStateId, isExpired, refreshAuthentication
-
-
-
-
Constructor Detail
-
OneStageAuthenticationState
public OneStageAuthenticationState(org.apache.pulsar.common.api.AuthData authData, java.net.SocketAddress remoteAddress, javax.net.ssl.SSLSession sslSession, AuthenticationProvider provider) throws javax.naming.AuthenticationException- Throws:
javax.naming.AuthenticationException
-
-
Method Detail
-
getAuthRole
public java.lang.String 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
public AuthenticationDataSource 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
-
-