List of usage examples for javax.security.sasl SaslServerFactory getMechanismNames
public abstract String[] getMechanismNames(Map<String, ?> props);
From source file:org.wildfly.security.sasl.entity.EntityTest.java
@Test public void testServerAuthDirect_Server() { SaslServerFactory factory = obtainSaslServerFactory(EntitySaslServerFactory.class); assertNotNull("SaslServerFactory not registered", factory); String[] mechanisms;/*ww w . j a v a 2s .c o m*/ Map<String, Object> props = new HashMap<String, Object>(); // No properties set mechanisms = factory.getMechanismNames(props); assertMechanisms(new String[] { SaslMechanismInformation.Names.IEC_ISO_9798_U_RSA_SHA1_ENC, SaslMechanismInformation.Names.IEC_ISO_9798_M_RSA_SHA1_ENC, SaslMechanismInformation.Names.IEC_ISO_9798_U_DSA_SHA1, SaslMechanismInformation.Names.IEC_ISO_9798_M_DSA_SHA1, SaslMechanismInformation.Names.IEC_ISO_9798_U_ECDSA_SHA1, SaslMechanismInformation.Names.IEC_ISO_9798_M_ECDSA_SHA1 }, mechanisms); // Request server auth props.put(Sasl.SERVER_AUTH, Boolean.toString(true)); mechanisms = factory.getMechanismNames(props); assertMechanisms(new String[] { SaslMechanismInformation.Names.IEC_ISO_9798_M_RSA_SHA1_ENC, SaslMechanismInformation.Names.IEC_ISO_9798_M_DSA_SHA1, SaslMechanismInformation.Names.IEC_ISO_9798_M_ECDSA_SHA1 }, mechanisms); }