Refactor _extractApiKeyPayload()