static AuthenticationHandler disabled() {
        return new AuthenticationHandler() {
            @Override
            public AuthenticationHandlerExecutionResult authenticate(final Credential credential, final Service service) throws PreventedException {
                throw new PreventedException("Authentication handler is disabled");
            }

            @Override
            public boolean supports(final Credential credential) {
                return false;
            }

            @Override
            public boolean supports(final Class<? extends Credential> clazz) {
                return false;
            }
        };
    }
Disabled authentication handler.

@return the authentication handler
api/cas-server-core-api-authentication/src/main/java/org/apereo/cas/authentication/AuthenticationHandler.java