26 lines
872 B
Python
26 lines
872 B
Python
from aws_lambda_powertools.event_handler.api_gateway import Router
|
|
|
|
from config import ISSUER, JWT_ALGORITHM
|
|
|
|
router = Router()
|
|
|
|
|
|
@router.get('/.well-known/openid-configuration')
|
|
def openid_configuration():
|
|
return {
|
|
'issuer': ISSUER,
|
|
'authorization_endpoint': f'{ISSUER}/authorize',
|
|
'token_endpoint': f'{ISSUER}/token',
|
|
'userinfo_endpoint': f'{ISSUER}/userinfo',
|
|
'jwks_uri': f'{ISSUER}/jwks.json',
|
|
'scopes_supported': ['openid', 'profile', 'email'],
|
|
'response_types_supported': ['code'],
|
|
'grant_types_supported': ['authorization_code', 'refresh_token'],
|
|
'subject_types_supported': ['public'],
|
|
'id_token_signing_alg_values_supported': [JWT_ALGORITHM],
|
|
'token_endpoint_auth_methods_supported': [
|
|
'client_secret_basic',
|
|
'client_secret_post',
|
|
],
|
|
}
|