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

Refactor Provider to specify custom URIs for API mount points #3

Open
dmitrizagidulin opened this issue Jun 7, 2018 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@dmitrizagidulin
Copy link
Contributor

Currently, the various OIDC-related API endpoints are hardcoded in the Provider's constructor:

    data['authorization_endpoint'] = `${issuer}/authorize`
    data['token_endpoint'] = `${issuer}/token`
    data['userinfo_endpoint'] = `${issuer}/userinfo`
    data['jwks_uri'] = `${issuer}/jwks`
    data['registration_endpoint'] = `${issuer}/register`
    data['check_session_iframe'] = `${issuer}/session`
    data['end_session_endpoint'] = `${issuer}/logout`

(This also affects how they're advertised in .well-known/openid-configuration).

It would be preferable to allow a consumer app to specify which URI path to mount these endpoints on. Sort of like:

let provider = new Provider({
  issuer: 'https://example.com',
  mount: '/oidc/'
})
// -> which would lead to:
// https://example.com/oidc/authorize
// https://example.com/oidc/token
// https://example.com/oidc/userinfo
// etc

Note: This is only a refactoring of the provider's discover() functionality, not anything to do with OP express routes.

@RubenVerborgh RubenVerborgh added the enhancement New feature or request label Aug 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants