Class AuthenticationProviderTls
- java.lang.Object
-
- org.apache.pulsar.broker.authentication.AuthenticationProviderTls
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,AuthenticationProvider
public class AuthenticationProviderTls extends java.lang.Object implements AuthenticationProvider
-
-
Constructor Summary
Constructors Constructor Description AuthenticationProviderTls()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringauthenticate(AuthenticationDataSource authData)Validate the authentication for the given credentials with the specified authentication data.voidclose()java.lang.StringgetAuthMethodName()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, wait
-
Methods inherited from interface org.apache.pulsar.broker.authentication.AuthenticationProvider
authenticateHttpRequest, newAuthState
-
-
-
-
Method Detail
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
initialize
public void initialize(ServiceConfiguration config) throws java.io.IOException
Description copied from interface:AuthenticationProviderPerform initialization for the authentication provider.- Specified by:
initializein interfaceAuthenticationProvider- Parameters:
config- broker config object- Throws:
java.io.IOException- if the initialization fails
-
getAuthMethodName
public java.lang.String getAuthMethodName()
- Specified by:
getAuthMethodNamein interfaceAuthenticationProvider- Returns:
- the authentication method name supported by this provider
-
authenticate
public java.lang.String authenticate(AuthenticationDataSource authData) throws javax.naming.AuthenticationException
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:
javax.naming.AuthenticationException- if the credentials are not valid
-
-