@Override
    public AuthenticationPolicy toAuthenticationPolicy(final RegisteredService registeredService) {
        val props = new RestAuthenticationPolicyProperties();
        props.setUrl(url);
        props.setBasicAuthUsername(basicAuthUsername);
        props.setBasicAuthPassword(basicAuthPassword);
        return new RestfulAuthenticationPolicy(props);
    }
This is {@link RestfulRegisteredServiceAuthenticationPolicyCriteria}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-services-authentication/src/main/java/org/apereo/cas/services/RestfulRegisteredServiceAuthenticationPolicyCriteria.java