Search in sources :

Example 1 with GroovyAuthenticationPolicyProperties

use of org.apereo.cas.configuration.model.core.authentication.GroovyAuthenticationPolicyProperties in project cas by apereo.

the class CoreAuthenticationUtilsTests method verifyAuthnPolicyGroovy.

@Test
public void verifyAuthnPolicyGroovy() throws Exception {
    val props = new AuthenticationPolicyProperties();
    props.getGroovy().add(new GroovyAuthenticationPolicyProperties().setScript("classpath:example.groovy"));
    val policy = CoreAuthenticationUtils.newAuthenticationPolicy(props);
    verifySerialization(policy);
}
Also used : lombok.val(lombok.val) GroovyAuthenticationPolicyProperties(org.apereo.cas.configuration.model.core.authentication.GroovyAuthenticationPolicyProperties) RestAuthenticationPolicyProperties(org.apereo.cas.configuration.model.core.authentication.RestAuthenticationPolicyProperties) AuthenticationPolicyProperties(org.apereo.cas.configuration.model.core.authentication.AuthenticationPolicyProperties) GroovyAuthenticationPolicyProperties(org.apereo.cas.configuration.model.core.authentication.GroovyAuthenticationPolicyProperties) Test(org.junit.jupiter.api.Test)

Aggregations

lombok.val (lombok.val)1 AuthenticationPolicyProperties (org.apereo.cas.configuration.model.core.authentication.AuthenticationPolicyProperties)1 GroovyAuthenticationPolicyProperties (org.apereo.cas.configuration.model.core.authentication.GroovyAuthenticationPolicyProperties)1 RestAuthenticationPolicyProperties (org.apereo.cas.configuration.model.core.authentication.RestAuthenticationPolicyProperties)1 Test (org.junit.jupiter.api.Test)1