puiterwijk / flask-oidc

OpenID Connect support for Flask
BSD 2-Clause "Simplified" License
154 stars 217 forks source link

authorized registration isn't possible with oidc-register #136

Closed sferich888 closed 2 years ago

sferich888 commented 2 years ago

Some OIDC providers allow for dynamic registration but only with authorization, currently this tool; doesn't provide/expose a way to to pass the proper 'authentication' tokens/parmiters along with the registration command.

I believe that this should be simple to add to: https://github.com/puiterwijk/flask-oidc/blob/7f16e27b926fc12953d6b2ae78a9b9cc9b8d1769/flask_oidc/registration.py#L118 by just simply takin in the auth token (following spec this has to be gotten from another source anyways), and simply appending it to the existing headers dictionary. {'Authorization': 'Bearer ' + auth_token} is likely what we want to add.