Skip to content

Message "Can't reach CAS server" but login works #204

Closed

Description

@hegocre

Hello,

After installing this plugin and configuring an external CAS server, the following message appears persistently in the WordPress dashboard:

Can't reach CAS server. Please provide accurate CAS settings) if you intend to use it.

The thing is, the server actually works, and I can login via the CAS server perfectly fine.

After doing some more digging, and checking #35, I found that the plugin validates the CAS server by making a wp_remote_get request to CAS_URL/path/serviceValidate. Also, after implementing the logging necessary to see the result of the request, I see that the server responds with a HTTP 400 Bad Request code, and with the message

<cas:authenticationFailure code="INVALID_REQUEST">Missing parameter: service</cas:authenticationFailure>

which is actually expected, since the request does not pass a service parametter.

I would like to ask if it would be possible to either accept a 400 code as a valid CAS server, or send a correct request to do the validation. If it is of any use, the server is a keycloak. Also, I can try any changes if needed.

Thank you very much!

Activity

  1. figureone commented on Jul 8, 2026

    @figureone
    Member

    Thanks for the detailed report! It does make sense to accept http 400 as a valid response. We have a keycloak test server but I hadn't ever configured it as a CAS provider, so we'll first try to fix the invalid request and fall back to accepting http 400 if needed.

    We'll get the fix bundled in the next release and reach out if we need any more info. Cheers

  2. added a commit that references this issue on Jul 16, 2026
    72260fb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions