use of org.apereo.cas.configuration.model.core.authentication.AuthenticationPolicyProperties in project cas by apereo.
the class CoreAuthenticationUtilsTests method verifyNoAuthPolicy.
@Test
public void verifyNoAuthPolicy() {
val props = new AuthenticationPolicyProperties();
props.getAny().setEnabled(false);
props.getNotPrevented().setEnabled(false);
assertTrue(CoreAuthenticationUtils.newAuthenticationPolicy(props).isEmpty());
}
use of org.apereo.cas.configuration.model.core.authentication.AuthenticationPolicyProperties in project cas by apereo.
the class CoreAuthenticationUtilsTests method verifyAuthnPolicyRest.
@Test
public void verifyAuthnPolicyRest() throws Exception {
val props = new AuthenticationPolicyProperties();
val rest = new RestAuthenticationPolicyProperties();
rest.setUrl("http://example.org");
props.getRest().add(rest);
val policy = CoreAuthenticationUtils.newAuthenticationPolicy(props);
verifySerialization(policy);
}
use of org.apereo.cas.configuration.model.core.authentication.AuthenticationPolicyProperties in project cas by apereo.
the class CoreAuthenticationUtilsTests method verifyAuthnPolicyAllHandlers.
@Test
public void verifyAuthnPolicyAllHandlers() throws Exception {
val props = new AuthenticationPolicyProperties();
props.getAllHandlers().setEnabled(true);
val policy = CoreAuthenticationUtils.newAuthenticationPolicy(props);
verifySerialization(policy);
}
use of org.apereo.cas.configuration.model.core.authentication.AuthenticationPolicyProperties in project cas by apereo.
the class CoreAuthenticationUtilsTests method verifyAuthnPolicyRequired.
@Test
public void verifyAuthnPolicyRequired() throws Exception {
val props = new AuthenticationPolicyProperties();
props.getReq().setEnabled(true);
val policy = CoreAuthenticationUtils.newAuthenticationPolicy(props);
verifySerialization(policy);
}
use of org.apereo.cas.configuration.model.core.authentication.AuthenticationPolicyProperties in project cas by apereo.
the class CoreAuthenticationUtilsTests method verifyAuthnPolicyNotPrevented.
@Test
public void verifyAuthnPolicyNotPrevented() throws Exception {
val props = new AuthenticationPolicyProperties();
props.getNotPrevented().setEnabled(true);
val policy = CoreAuthenticationUtils.newAuthenticationPolicy(props);
verifySerialization(policy);
}
Aggregations