use of org.apereo.cas.authentication.DefaultAuthenticationTransactionFactory in project cas by apereo.
the class WsFederationCredentialsToPrincipalResolverCasResolutionTests method verifyAuth.
@Test
public void verifyAuth() {
val creds = getCredential();
val auth = authenticationManager.authenticate(new DefaultAuthenticationTransactionFactory().newTransaction(creds));
assertNotNull(auth);
}
use of org.apereo.cas.authentication.DefaultAuthenticationTransactionFactory in project cas by apereo.
the class WsFederationCredentialsToPrincipalResolverAllResolutionTests method verifyAuth.
@Test
public void verifyAuth() {
val creds = getCredential();
val auth = authenticationManager.authenticate(new DefaultAuthenticationTransactionFactory().newTransaction(creds));
assertNotNull(auth);
}
use of org.apereo.cas.authentication.DefaultAuthenticationTransactionFactory in project cas by apereo.
the class WsFederationCredentialsToPrincipalResolverTests method verifyAuth.
@Test
public void verifyAuth() {
val creds = getCredential();
val auth = authenticationManager.authenticate(new DefaultAuthenticationTransactionFactory().newTransaction(creds));
assertNotNull(auth);
}
use of org.apereo.cas.authentication.DefaultAuthenticationTransactionFactory in project cas by apereo.
the class X509SubjectDNPrincipalResolverAggregateTests method verifyResolverAsAggregate.
@Test
public void verifyResolverAsAggregate() {
val c = new X509CertificateCredential(new X509Certificate[] { VALID_CERTIFICATE });
c.setCertificate(VALID_CERTIFICATE);
val result = authenticationManager.authenticate(new DefaultAuthenticationTransactionFactory().newTransaction(c));
assertNotNull(result);
val attributes = result.getPrincipal().getAttributes();
assertTrue(attributes.containsKey("subjectX500Principal"));
assertTrue(attributes.containsKey("groovySubjectX500Principal"));
}
use of org.apereo.cas.authentication.DefaultAuthenticationTransactionFactory in project cas by apereo.
the class CredentialsAsFirstParameterResourceResolverTests method verifyTransaction.
@Test
public void verifyTransaction() {
val resolver = new CredentialsAsFirstParameterResourceResolver();
val jp = mock(JoinPoint.class);
when(jp.getArgs()).thenReturn(new Object[] { new DefaultAuthenticationTransactionFactory().newTransaction(CoreAuthenticationTestUtils.getCredentialsWithSameUsernameAndPassword("casuser")) });
assertNotNull(resolver.resolveFrom(jp, new Object()));
}
Aggregations