Search in sources :

Example 1 with ClassCode

use of org.apache.geode.security.generator.AuthzCredentialGenerator.ClassCode in project geode by apache.

the class ClientAuthorizationTestCase method getDummyGeneratorCombos.

protected List<AuthzCredentialGenerator> getDummyGeneratorCombos() {
    List<AuthzCredentialGenerator> generators = new ArrayList<>();
    Iterator authzCodeIter = AuthzCredentialGenerator.ClassCode.getAll().iterator();
    while (authzCodeIter.hasNext()) {
        ClassCode authzClassCode = (ClassCode) authzCodeIter.next();
        AuthzCredentialGenerator authzGen = AuthzCredentialGenerator.create(authzClassCode);
        if (authzGen != null) {
            CredentialGenerator cGen = new DummyCredentialGenerator();
            cGen.init();
            if (authzGen.init(cGen)) {
                generators.add(authzGen);
            }
        }
    }
    assertTrue(generators.size() > 0);
    return generators;
}
Also used : ClassCode(org.apache.geode.security.generator.AuthzCredentialGenerator.ClassCode) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) AuthzCredentialGenerator(org.apache.geode.security.generator.AuthzCredentialGenerator) XmlAuthzCredentialGenerator(org.apache.geode.security.generator.XmlAuthzCredentialGenerator) DummyCredentialGenerator(org.apache.geode.security.generator.DummyCredentialGenerator) AuthzCredentialGenerator(org.apache.geode.security.generator.AuthzCredentialGenerator) XmlAuthzCredentialGenerator(org.apache.geode.security.generator.XmlAuthzCredentialGenerator) CredentialGenerator(org.apache.geode.security.generator.CredentialGenerator) DummyCredentialGenerator(org.apache.geode.security.generator.DummyCredentialGenerator)

Aggregations

ArrayList (java.util.ArrayList)1 Iterator (java.util.Iterator)1 AuthzCredentialGenerator (org.apache.geode.security.generator.AuthzCredentialGenerator)1 ClassCode (org.apache.geode.security.generator.AuthzCredentialGenerator.ClassCode)1 CredentialGenerator (org.apache.geode.security.generator.CredentialGenerator)1 DummyCredentialGenerator (org.apache.geode.security.generator.DummyCredentialGenerator)1 XmlAuthzCredentialGenerator (org.apache.geode.security.generator.XmlAuthzCredentialGenerator)1