Package org.wildfly.security.sasl.util
Class AvailableRealmsSaslServerFactory
- java.lang.Object
-
- org.wildfly.security.sasl.util.AbstractDelegatingSaslServerFactory
-
- org.wildfly.security.sasl.util.AvailableRealmsSaslServerFactory
-
- All Implemented Interfaces:
SaslServerFactory
public final class AvailableRealmsSaslServerFactory extends AbstractDelegatingSaslServerFactory
ASaslServerFactory
which sets the server's available realms using the legacyWildFlySasl.REALM_LIST
property, if specified.- Author:
- Farah Juma
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_DELIMITER
static int
DEFAULT_ESCAPE_CHARACTER
private int[]
delims
private int
escapeCharacter
-
Fields inherited from class org.wildfly.security.sasl.util.AbstractDelegatingSaslServerFactory
delegate
-
-
Constructor Summary
Constructors Constructor Description AvailableRealmsSaslServerFactory(SaslServerFactory delegate)
Construct a new instance.AvailableRealmsSaslServerFactory(SaslServerFactory delegate, int escapeCharacter, int... delims)
Construct a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SaslServer
createSaslServer(String mechanism, String protocol, String serverName, Map<String,?> props, CallbackHandler cbh)
private static boolean
isDelim(int c, int... delims)
(package private) static String[]
realmListPropertyToArray(String realmList)
(package private) static String[]
realmListPropertyToArray(String realmList, int escapeCharacter, int... delims)
private static void
skipDelims(org.wildfly.common.iteration.CodePointIterator di, org.wildfly.common.iteration.CodePointIterator cpi, int... delims)
-
Methods inherited from class org.wildfly.security.sasl.util.AbstractDelegatingSaslServerFactory
delegatesThrough, delegatesThroughNN, getMechanismNames, toString
-
-
-
-
Field Detail
-
DEFAULT_DELIMITER
public static final int DEFAULT_DELIMITER
- See Also:
- Constant Field Values
-
DEFAULT_ESCAPE_CHARACTER
public static final int DEFAULT_ESCAPE_CHARACTER
- See Also:
- Constant Field Values
-
escapeCharacter
private final int escapeCharacter
-
delims
private final int[] delims
-
-
Constructor Detail
-
AvailableRealmsSaslServerFactory
public AvailableRealmsSaslServerFactory(SaslServerFactory delegate)
Construct a new instance. The delimiter used to separate the realm names in the list of realms is assumed to be 32. The escape character is assumed to be 92.- Parameters:
delegate
- the delegateSaslServerFactory
-
AvailableRealmsSaslServerFactory
public AvailableRealmsSaslServerFactory(SaslServerFactory delegate, int escapeCharacter, int... delims)
Construct a new instance.- Parameters:
delegate
- the delegateSaslServerFactory
escapeCharacter
- the escape characterdelims
- the delimiters that separate the realm names in 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:
createSaslServer
in interfaceSaslServerFactory
- Overrides:
createSaslServer
in classAbstractDelegatingSaslServerFactory
- Throws:
SaslException
-
realmListPropertyToArray
static String[] realmListPropertyToArray(String realmList, int escapeCharacter, int... delims)
-
isDelim
private static boolean isDelim(int c, int... delims)
-
skipDelims
private static void skipDelims(org.wildfly.common.iteration.CodePointIterator di, org.wildfly.common.iteration.CodePointIterator cpi, int... delims)
-
-