from aws_lambda_powertools import Logger
from aws_lambda_powertools.event_handler.api_gateway import Router

from oauth2 import RevocationEndpoint, server

logger = Logger(__name__)
router = Router()


@router.post('/revoke')
def revoke():
    return server.create_endpoint_response(
        RevocationEndpoint.ENDPOINT_NAME,
        router.current_event,
    )
