Class AuthenticationProviderTls
java.lang.Object
org.apache.pulsar.broker.authentication.AuthenticationProviderTls
- All Implemented Interfaces:
Closeable,AutoCloseable,AuthenticationProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(AuthenticationDataSource authData) Validate the authentication for the given credentials with the specified authentication data.voidclose()voidinitialize(ServiceConfiguration config) Perform initialization for the authentication provider.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.AuthenticationProvider
authenticateAsync, authenticateHttpRequest, authenticateHttpRequestAsync, incrementFailureMetric, newAuthState, newHttpAuthState
-
Constructor Details
-
AuthenticationProviderTls
public AuthenticationProviderTls()
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
initialize
Description copied from interface:AuthenticationProviderPerform initialization for the authentication provider.- Specified by:
initializein interfaceAuthenticationProvider- Parameters:
config- broker config object- Throws:
IOException- if the initialization fails
-
getAuthMethodName
- Specified by:
getAuthMethodNamein interfaceAuthenticationProvider- Returns:
- the authentication method name supported by this provider
-
authenticate
Description copied from interface:AuthenticationProviderValidate the authentication for the given credentials with the specified authentication data. This method is useful in one stage authn, if you're not doing one stage or if you're providing your own state implementation for one stage authn, it should throw an exception.- Specified by:
authenticatein interfaceAuthenticationProvider- Parameters:
authData- provider specific authentication data- Returns:
- the "role" string for the authenticated connection, if the authentication was successful
- Throws:
AuthenticationException- if the credentials are not valid
-