Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved error messaging on failed authentication with Client Identifier #1604

Open
jeswr opened this issue Mar 27, 2023 · 1 comment
Open
Labels

Comments

@jeswr
Copy link
Contributor

jeswr commented Mar 27, 2023

Feature description

It would be useful to have better error messaging around some cases when authentication fails due to the contents of the Client Identifier Document. The particular error that I found confusing was when I tried (incorrectly) to use a the following Client Id Document containing relative URIs:

{
  "@context": ["https://www.w3.org/ns/solid/oidc-context.jsonld"],
  "client_id": "",
  "client_name": "Comunica Web Client",
  "redirect_uris": ["/"],
  "post_logout_redirect_uris": ["/"],
  "client_uri": "/",
  "logo_uri" : "/images/logo.svg",
  "scope" : "openid profile offline_access webid",
  "grant_types" : ["refresh_token","authorization_code"],
  "response_types" : ["code"],
  "default_max_age" : 3600,
  "require_auth_time" : true
}

The error message I receive is "The client registration client_id field must match the client WebID"; which is a little confusing when they do match so far as the json-ld spec is concerned. For those kinds if error messages I think an isValidUri check should be applied first and the error message should indicate whether the client_id field contains an absolute uri and note that one is required.

This should be done for all other fields that required absolute URIs (which I believe are all of them so far as the spec is concerned).

@joachimvh
Copy link
Member

Sure we could add an extra check to specific fields in the WebIdAdapterFactory (and also rename that class to something that makes more sense).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants