Created
March 30, 2020 17:19
-
-
Save groovecoder/8ecf3b6953067018b0341b1cf26c32b0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from django.apps import AppConfig | |
from django.conf import settings | |
class PrivateRelayConfig(AppConfig): | |
name = 'privaterelay' | |
def __init__(self, app_name, app_module): | |
super(PrivateRelayConfig, self).__init__(app_name, app_module) | |
self.fxa_verifying_keys = [] | |
def ready(self): | |
resp = requests.get('%s/jwks' % | |
settings.SOCIALACCOUNT_PROVIDERS['fxa']['OAUTH_ENDPOINT'] | |
) | |
resp_json = resp.json() | |
self.fxa_verifying_keys = resp_json['keys'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment