Package org.wildfly.security.sasl.util
Class LegacyRealmListSaslServerFactory
- java.lang.Object
-
- org.wildfly.security.sasl.util.AbstractDelegatingSaslServerFactory
-
- org.wildfly.security.sasl.util.LegacyRealmListSaslServerFactory
-
- All Implemented Interfaces:
SaslServerFactory
public final class LegacyRealmListSaslServerFactory extends AbstractDelegatingSaslServerFactory
ASaslServerFactorywhich uses theAvailableRealmsCallbackto populate the legacyWildFlySasl.REALM_LISTproperty, if needed by a mechanism.- Author:
- Farah Juma
-
-
Field Summary
Fields Modifier and Type Field Description static charDEFAULT_DELIMITERstatic charDEFAULT_ESCAPE_CHARACTERprivate int[]delimsprivate intescapeCharacter-
Fields inherited from class org.wildfly.security.sasl.util.AbstractDelegatingSaslServerFactory
delegate
-
-
Constructor Summary
Constructors Constructor Description LegacyRealmListSaslServerFactory(SaslServerFactory delegate)Construct a new instance.LegacyRealmListSaslServerFactory(SaslServerFactory delegate, char escapeCharacter, int... delims)Construct a new instance.LegacyRealmListSaslServerFactory(SaslServerFactory delegate, char escapeCharacter, String delims)Construct a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static voidaddDelims(StringBuilder realmList, int... delims)(package private) static StringarrayToRealmListProperty(String[] realms)(package private) static StringarrayToRealmListProperty(String[] realms, int escapeCharacter, int... delims)SaslServercreateSaslServer(String mechanism, String protocol, String serverName, Map<String,?> props, CallbackHandler cbh)-
Methods inherited from class org.wildfly.security.sasl.util.AbstractDelegatingSaslServerFactory
delegatesThrough, delegatesThroughNN, getMechanismNames, toString
-
-
-
-
Field Detail
-
DEFAULT_DELIMITER
public static final char DEFAULT_DELIMITER
- See Also:
- Constant Field Values
-
DEFAULT_ESCAPE_CHARACTER
public static final char DEFAULT_ESCAPE_CHARACTER
- See Also:
- Constant Field Values
-
escapeCharacter
private final int escapeCharacter
-
delims
private final int[] delims
-
-
Constructor Detail
-
LegacyRealmListSaslServerFactory
public LegacyRealmListSaslServerFactory(SaslServerFactory delegate)
Construct a new instance. The delimiter that should be used to separate the realm names when populating the list of realms is assumed to be 32. The escape character is assumed to be 92.- Parameters:
delegate- the delegateSaslServerFactory
-
LegacyRealmListSaslServerFactory
public LegacyRealmListSaslServerFactory(SaslServerFactory delegate, char escapeCharacter, String delims)
Construct a new instance.- Parameters:
delegate- the delegateSaslServerFactoryescapeCharacter- the escape character to use when populating the list of realmsdelims- the delimiters that should be used to separate the realm names when populating the list of realms
-
LegacyRealmListSaslServerFactory
public LegacyRealmListSaslServerFactory(SaslServerFactory delegate, char escapeCharacter, int... delims)
Construct a new instance.- Parameters:
delegate- the delegateSaslServerFactoryescapeCharacter- the escape character to use when populating the list of realmsdelims- the delimiters that should be used to separate the realm names when populating the list of realms
-
-
Method Detail
-
createSaslServer
public SaslServer createSaslServer(String mechanism, String protocol, String serverName, Map<String,?> props, CallbackHandler cbh) throws SaslException
- Specified by:
createSaslServerin interfaceSaslServerFactory- Overrides:
createSaslServerin classAbstractDelegatingSaslServerFactory- Throws:
SaslException
-
arrayToRealmListProperty
static String arrayToRealmListProperty(String[] realms, int escapeCharacter, int... delims)
-
addDelims
private static void addDelims(StringBuilder realmList, int... delims)
-
-