接口 AuthenticationDataProvider
-
- 所有超级接口:
java.io.Serializable
@LimitedPrivate @Stable public interface AuthenticationDataProvider extends java.io.Serializable
Interface for accessing data which are used in variety of authentication schemes on client side.
-
-
方法概要
所有方法 实例方法 默认方法 修饰符和类型 方法 说明 default AuthDataauthenticate(AuthData data)For mutual authentication, This method use passed in `data` to evaluate and challenge, then returns null if authentication has completed; returns authenticated data back to server side, if authentication has not completed.default java.lang.StringgetCommandData()default java.lang.StringgetHttpAuthType()default java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>>getHttpHeaders()default java.lang.StringgetTlsCerificateFilePath()default java.security.cert.Certificate[]getTlsCertificates()default KeyStoreParamsgetTlsKeyStoreParams()Used for TLS authentication with keystore type.default java.security.PrivateKeygetTlsPrivateKey()default java.lang.StringgetTlsPrivateKeyFilePath()default java.io.InputStreamgetTlsTrustStoreStream()default booleanhasDataForHttp()Check if data for HTTP are available.default booleanhasDataForTls()Check if data for TLS are available.default booleanhasDataFromCommand()Check if data from Pulsar protocol are available.
-
-
-
方法详细资料
-
hasDataForTls
default boolean hasDataForTls()
Check if data for TLS are available.- 返回:
- true if this authentication data contain data for TLS
-
getTlsCertificates
default java.security.cert.Certificate[] getTlsCertificates()
- 返回:
- a client certificate chain, or null if the data are not available
-
getTlsCerificateFilePath
default java.lang.String getTlsCerificateFilePath()
- 返回:
- a client certificate file path
-
getTlsPrivateKey
default java.security.PrivateKey getTlsPrivateKey()
- 返回:
- a private key for the client certificate, or null if the data are not available
-
getTlsPrivateKeyFilePath
default java.lang.String getTlsPrivateKeyFilePath()
- 返回:
- a private key file path
-
getTlsTrustStoreStream
default java.io.InputStream getTlsTrustStoreStream()
- 返回:
- an input-stream of the trust store, or null if the trust-store provided at
ClientConfigurationData#getTlsTrustStorePath()
-
getTlsKeyStoreParams
default KeyStoreParams getTlsKeyStoreParams()
Used for TLS authentication with keystore type.- 返回:
- a KeyStoreParams for the client certificate chain, or null if the data are not available
-
hasDataForHttp
default boolean hasDataForHttp()
Check if data for HTTP are available.- 返回:
- true if this authentication data contain data for HTTP
-
getHttpAuthType
default java.lang.String getHttpAuthType()
- 返回:
- a authentication scheme, or
nullif the request will not be authenticated.
-
getHttpHeaders
default java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>> getHttpHeaders() throws java.lang.Exception- 返回:
- an enumeration of all the header names
- 抛出:
java.lang.Exception
-
hasDataFromCommand
default boolean hasDataFromCommand()
Check if data from Pulsar protocol are available.- 返回:
- true if this authentication data contain data from Pulsar protocol
-
getCommandData
default java.lang.String getCommandData()
- 返回:
- authentication data which will be stored in a command
-
authenticate
default AuthData authenticate(AuthData data) throws javax.naming.AuthenticationException
For mutual authentication, This method use passed in `data` to evaluate and challenge, then returns null if authentication has completed; returns authenticated data back to server side, if authentication has not completed.Mainly used for mutual authentication like sasl.
- 抛出:
javax.naming.AuthenticationException
-
-