add jwt
This commit is contained in:
@@ -1,8 +1,17 @@
|
||||
from authlib.jose import JsonWebKey
|
||||
from aws_lambda_powertools.event_handler.api_gateway import Router
|
||||
|
||||
from util import read_file_path
|
||||
|
||||
router = Router()
|
||||
|
||||
|
||||
public_jwk = JsonWebKey.import_key(read_file_path('public.pem'), {'kty': 'RSA'})
|
||||
|
||||
|
||||
@router.get('/.well-known/jwks.json')
|
||||
def jwks():
|
||||
return {}
|
||||
key = public_jwk.as_dict()
|
||||
key['use'] = 'sig'
|
||||
key['kid'] = 'k1'
|
||||
return {'keys': [key]}
|
||||
|
||||
Reference in New Issue
Block a user