def config_app(self):
     self.app.config.update({
         'OAUTH2_JWT_ENABLED': True,
         'OAUTH2_JWT_ISS': 'Authlib',
         'OAUTH2_JWT_KEY_PATH': get_file_path('rsa_private.pem'),
         'OAUTH2_JWT_ALG': 'RS256',
     })
示例#2
0
    def config_app(self):
        jwt_key_path = get_file_path('rsa_private.pem')
        with open(jwt_key_path, 'r') as f:
            jwt_key = to_unicode(f.read())

        DUMMY_JWT_CONFIG.update({
            'iss': 'Authlib',
            'key': jwt_key,
            'alg': 'RS256',
        })
示例#3
0
    def config_app(self):
        jwt_key_path = get_file_path('secp521r1-private.json')
        with open(jwt_key_path, 'r') as f:
            jwt_key = json.load(f)

        DUMMY_JWT_CONFIG.update({
            'iss': 'Authlib',
            'key': jwt_key,
            'alg': 'ES512',
        })
示例#4
0
 def config_app(self):
     self.app.config.update({
         'OAUTH2_JWT_ENABLED':
         True,
         'OAUTH2_JWT_ISS':
         'Authlib',
         'OAUTH2_JWT_KEY_PATH':
         get_file_path('secp521r1-private.json'),
         'OAUTH2_JWT_ALG':
         'ES512',
     })
 def get_validate_key(self):
     with open(get_file_path('rsa_public.pem'), 'r') as f:
         return f.read()
 def get_validate_key(self):
     with open(get_file_path('ec_public.json'), 'r') as f:
         return json.load(f)
示例#7
0
 def get_validate_key(self):
     with open(get_file_path('jwks_public.json'), 'r') as f:
         return JsonWebKey.import_key_set(json.load(f))