Package org.wildfly.security.sasl.util
Class TrustManagerSaslServerFactory
- java.lang.Object
-
- org.wildfly.security.sasl.util.AbstractDelegatingSaslServerFactory
-
- org.wildfly.security.sasl.util.TrustManagerSaslServerFactory
-
- All Implemented Interfaces:
SaslServerFactory
public final class TrustManagerSaslServerFactory extends AbstractDelegatingSaslServerFactory
ASaslServerFactory
which sets the trust manager that should be used for trust verification.- Author:
- Farah Juma
-
-
Field Summary
Fields Modifier and Type Field Description private SecurityFactory<X509TrustManager>
trustManagerFactory
-
Fields inherited from class org.wildfly.security.sasl.util.AbstractDelegatingSaslServerFactory
delegate
-
-
Constructor Summary
Constructors Constructor Description TrustManagerSaslServerFactory(SaslServerFactory delegate, X509TrustManager trustManager)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SaslServer
createSaslServer(String mechanism, String protocol, String serverName, Map<String,?> props, CallbackHandler cbh)
private List<TrustedAuthority>
getTrustedAuthorities(X509Certificate[] acceptedIssuers)
private X509TrustManager
getTrustManager()
-
Methods inherited from class org.wildfly.security.sasl.util.AbstractDelegatingSaslServerFactory
delegatesThrough, delegatesThroughNN, getMechanismNames, toString
-
-
-
-
Field Detail
-
trustManagerFactory
private final SecurityFactory<X509TrustManager> trustManagerFactory
-
-
Constructor Detail
-
TrustManagerSaslServerFactory
public TrustManagerSaslServerFactory(SaslServerFactory delegate, X509TrustManager trustManager)
Construct a new instance.- Parameters:
delegate
- the delegate SASL server factorytrustManager
- the trust manager to use ornull
if the default trust manager should be used
-
-
Method Detail
-
createSaslServer
public SaslServer createSaslServer(String mechanism, String protocol, String serverName, Map<String,?> props, CallbackHandler cbh) throws SaslException
- Specified by:
createSaslServer
in interfaceSaslServerFactory
- Overrides:
createSaslServer
in classAbstractDelegatingSaslServerFactory
- Throws:
SaslException
-
getTrustedAuthorities
private List<TrustedAuthority> getTrustedAuthorities(X509Certificate[] acceptedIssuers)
-
getTrustManager
private X509TrustManager getTrustManager() throws SaslException
- Throws:
SaslException
-
-