How would you implement token-based authentication in a serverless environment ?