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

from oauth2 import server

logger = Logger(__name__)
router = Router()


@router.post('/token')
def issue_token():
    return server.create_token_response(router.current_event)
