use of org.apereo.cas.authentication.DefaultAuthenticationTransactionFactory in project cas by apereo.
the class ByCredentialTypeAuthenticationHandlerResolverTests method verifySupports.
@Test
public void verifySupports() {
val resolver = new ByCredentialTypeAuthenticationHandlerResolver(UsernamePasswordCredential.class);
assertTrue(resolver.supports(CollectionUtils.wrapSet(new SimpleTestUsernamePasswordAuthenticationHandler()), new DefaultAuthenticationTransactionFactory().newTransaction(CoreAuthenticationTestUtils.getCredentialsWithSameUsernameAndPassword())));
}
use of org.apereo.cas.authentication.DefaultAuthenticationTransactionFactory in project cas by apereo.
the class ByCredentialSourceAuthenticationHandlerResolverTests method verifySupports.
@Test
public void verifySupports() {
val resolver = new ByCredentialSourceAuthenticationHandlerResolver();
assertTrue(resolver.supports(CollectionUtils.wrapSet(new SimpleTestUsernamePasswordAuthenticationHandler()), new DefaultAuthenticationTransactionFactory().newTransaction(CoreAuthenticationTestUtils.getCredentialsWithSameUsernameAndPassword())));
}
use of org.apereo.cas.authentication.DefaultAuthenticationTransactionFactory in project cas by apereo.
the class ByCredentialSourceAuthenticationHandlerResolverTests method verifyResolves.
@Test
public void verifyResolves() {
val resolver = new ByCredentialSourceAuthenticationHandlerResolver();
val c = CoreAuthenticationTestUtils.getCredentialsWithSameUsernameAndPassword();
c.setSource("TestHandler");
val handler = new SimpleTestUsernamePasswordAuthenticationHandler("TESTHANDLER");
val results = resolver.resolve(CollectionUtils.wrapSet(handler), new DefaultAuthenticationTransactionFactory().newTransaction(c));
assertFalse(results.isEmpty());
}
Aggregations