Search in sources :

Example 1 with MockUnsuccessfulJcifsAuthentication

use of org.apereo.cas.support.spnego.MockUnsuccessfulJcifsAuthentication in project cas by apereo.

the class JcifsSpnegoAuthenticationHandlerTests method verifyUnsuccessfulAuthenticationWithExceptionOnProcess.

@Test
public void verifyUnsuccessfulAuthenticationWithExceptionOnProcess() throws Exception {
    val credentials = new SpnegoCredential(new byte[] { 0, 1, 2 });
    val authenticationHandler = new JcifsSpnegoAuthenticationHandler(StringUtils.EMPTY, null, null, CollectionUtils.wrapList(new MockUnsuccessfulJcifsAuthentication(true)), true, true, null);
    authenticate(credentials, authenticationHandler);
}
Also used : lombok.val(lombok.val) SpnegoCredential(org.apereo.cas.support.spnego.authentication.principal.SpnegoCredential) MockUnsuccessfulJcifsAuthentication(org.apereo.cas.support.spnego.MockUnsuccessfulJcifsAuthentication) Test(org.junit.jupiter.api.Test)

Example 2 with MockUnsuccessfulJcifsAuthentication

use of org.apereo.cas.support.spnego.MockUnsuccessfulJcifsAuthentication in project cas by apereo.

the class JcifsSpnegoAuthenticationHandlerTests method verifyUnsuccessfulAuthentication.

@Test
public void verifyUnsuccessfulAuthentication() throws Exception {
    val credentials = new SpnegoCredential(new byte[] { 0, 1, 2 });
    val authenticationHandler = new JcifsSpnegoAuthenticationHandler(StringUtils.EMPTY, null, null, CollectionUtils.wrapList(new MockUnsuccessfulJcifsAuthentication(false)), true, true, null);
    authenticate(credentials, authenticationHandler);
}
Also used : lombok.val(lombok.val) SpnegoCredential(org.apereo.cas.support.spnego.authentication.principal.SpnegoCredential) MockUnsuccessfulJcifsAuthentication(org.apereo.cas.support.spnego.MockUnsuccessfulJcifsAuthentication) Test(org.junit.jupiter.api.Test)

Aggregations

lombok.val (lombok.val)2 MockUnsuccessfulJcifsAuthentication (org.apereo.cas.support.spnego.MockUnsuccessfulJcifsAuthentication)2 SpnegoCredential (org.apereo.cas.support.spnego.authentication.principal.SpnegoCredential)2 Test (org.junit.jupiter.api.Test)2