Package org.wildfly.security.sasl.otp
Class OTPSaslClientFactory
- java.lang.Object
-
- org.wildfly.security.sasl.otp.OTPSaslClientFactory
-
- All Implemented Interfaces:
SaslClientFactory
@MetaInfServices(javax.security.sasl.SaslClientFactory.class) public final class OTPSaslClientFactory extends Object implements SaslClientFactory
The client factory for the OTP SASL mechanism.- Author:
- Farah Juma
-
-
Constructor Summary
Constructors Constructor Description OTPSaslClientFactory()
OTPSaslClientFactory(Provider provider)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SaslClient
createSaslClient(String[] mechanisms, String authorizationId, String protocol, String serverName, Map<String,?> props, CallbackHandler cbh)
static String
dictionaryArrayToProperty(String[] dictionaryArray)
Construct the value of theOTP_ALTERNATE_DICTIONARY
property from an array of words.(package private) static String[]
dictionaryPropertyToArray(String property)
String[]
getMechanismNames(Map<String,?> props)
-
-
-
Constructor Detail
-
OTPSaslClientFactory
public OTPSaslClientFactory()
-
OTPSaslClientFactory
public OTPSaslClientFactory(Provider provider)
-
-
Method Detail
-
createSaslClient
public SaslClient createSaslClient(String[] mechanisms, String authorizationId, String protocol, String serverName, Map<String,?> props, CallbackHandler cbh) throws SaslException
- Specified by:
createSaslClient
in interfaceSaslClientFactory
- Throws:
SaslException
-
getMechanismNames
public String[] getMechanismNames(Map<String,?> props)
- Specified by:
getMechanismNames
in interfaceSaslClientFactory
-
dictionaryArrayToProperty
public static String dictionaryArrayToProperty(String[] dictionaryArray)
Construct the value of theOTP_ALTERNATE_DICTIONARY
property from an array of words.- Parameters:
dictionaryArray
- the array of words in the alternate dictionary- Returns:
- the alternate dictionary as a string, where each word is separated by a space character
-
dictionaryPropertyToArray
static String[] dictionaryPropertyToArray(String property) throws SaslException
- Throws:
SaslException
-
-