Search in sources :

Example 6 with AuthenticationBuilder

use of org.apereo.cas.authentication.AuthenticationBuilder in project cas by apereo.

the class SamlAuthenticationMetaDataPopulatorTests method verifyAuthenticationTypeNotFound.

@Test
public void verifyAuthenticationTypeNotFound() {
    final CustomCredential credentials = new CustomCredential();
    final AuthenticationBuilder builder = CoreAuthenticationTestUtils.getAuthenticationBuilder();
    this.populator.populateAttributes(builder, AuthenticationTransaction.of(credentials));
    final Authentication auth = builder.build();
    assertNull(auth.getAttributes().get(SamlAuthenticationMetaDataPopulator.ATTRIBUTE_AUTHENTICATION_METHOD));
}
Also used : AuthenticationBuilder(org.apereo.cas.authentication.AuthenticationBuilder) Authentication(org.apereo.cas.authentication.Authentication) Test(org.junit.Test)

Aggregations

AuthenticationBuilder (org.apereo.cas.authentication.AuthenticationBuilder)6 DefaultAuthenticationBuilder (org.apereo.cas.authentication.DefaultAuthenticationBuilder)5 BasicCredentialMetaData (org.apereo.cas.authentication.BasicCredentialMetaData)4 CredentialMetaData (org.apereo.cas.authentication.CredentialMetaData)3 UsernamePasswordCredential (org.apereo.cas.authentication.UsernamePasswordCredential)3 Principal (org.apereo.cas.authentication.principal.Principal)3 HashMap (java.util.HashMap)2 LinkedHashMap (java.util.LinkedHashMap)2 Authentication (org.apereo.cas.authentication.Authentication)2 BasicIdentifiableCredential (org.apereo.cas.authentication.BasicIdentifiableCredential)2 DefaultAuthenticationHandlerExecutionResult (org.apereo.cas.authentication.DefaultAuthenticationHandlerExecutionResult)2 DefaultHandlerResult (org.apereo.cas.authentication.DefaultHandlerResult)2 Test (org.junit.Test)2 HashSet (java.util.HashSet)1 CachedData (net.spy.memcached.CachedData)1 AcceptUsersAuthenticationHandler (org.apereo.cas.authentication.AcceptUsersAuthenticationHandler)1 AuthenticationHandler (org.apereo.cas.authentication.AuthenticationHandler)1 AuthenticationHandlerExecutionResult (org.apereo.cas.authentication.AuthenticationHandlerExecutionResult)1 AuthenticationResult (org.apereo.cas.authentication.AuthenticationResult)1 Credential (org.apereo.cas.authentication.Credential)1