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

client.register() has no easy way to pass in an Initial Access Token #432

Closed
schlenk opened this issue Oct 13, 2017 · 0 comments
Closed

Comments

@schlenk
Copy link
Collaborator

schlenk commented Oct 13, 2017

If a OP has dynamic client registration open, but requires an Initial Access Token to access the registration endpoint, this is currently not possible via client.register().

This can happen if the OP follows the spec:
https://openid.net/specs/openid-connect-registration-1_0.html#ClientRegistration

The OpenID Provider MAY require an Initial Access Token that is provisioned out-of-band (in a manner that is out of scope for this specification) to restrict registration requests to only authorized Clients or developers.

One can hack around it with a custom requests auth class:

client.request_args['auth'] = HTTPBearerAuth(registration_token)
registration_info = client.register(registration_endpoint, **args)
del client.request_args['auth']

This feels a bit dirty. The register() API should take some auth information via a kwarg directly.

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

No branches or pull requests

3 participants