Closed tandrade96 closed 3 years ago
Other than imports, the rsa key generation is only 3 lines.
Check out how it's accomplished in the management command here: https://github.com/juanifioren/django-oidc-provider/blob/master/oidc_provider/management/commands/creatersakey.py
Thank you so much!
TLDR: Is there a way to programmatically create an RSA Key? I need it to test my oidc middleware
I am testing an app that uses
django-oidc-provider
, and as far as I get to understand, many operations require that an RSA key is registered (for example if I request forauthorize
with atoken
flow, it answers with theYou must add at least one RSA Key
exception).My problem is I don't know how to set that RSA Key creation inside my tests programmatically, I have only found about
python manage.py create rsa key
but it's not what I am looking for because it is not automaticThank you!