List of usage examples for javax.security.sasl SaslClientFactory getMechanismNames
public abstract String[] getMechanismNames(Map<String, ?> props);
From source file:org.wildfly.security.sasl.entity.EntityTest.java
@Test public void testServerAuthDirect_Client() { SaslClientFactory factory = obtainSaslClientFactory(EntitySaslClientFactory.class); assertNotNull("SaslClientFactory not registered", factory); String[] mechanisms;/*w w w .j a v a2 s . c om*/ 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); }