From 58a2a735ac329f890c5dd4a042b35ee544084db0 Mon Sep 17 00:00:00 2001 From: jonathan vanasco Date: Wed, 12 Aug 2015 12:37:21 -0400 Subject: adding validator_log to store what the endpoint computed --- oauthlib/oauth1/rfc5849/endpoints/access_token.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'oauthlib/oauth1/rfc5849/endpoints/access_token.py') diff --git a/oauthlib/oauth1/rfc5849/endpoints/access_token.py b/oauthlib/oauth1/rfc5849/endpoints/access_token.py index 26db919..567965a 100644 --- a/oauthlib/oauth1/rfc5849/endpoints/access_token.py +++ b/oauthlib/oauth1/rfc5849/endpoints/access_token.py @@ -192,6 +192,13 @@ class AccessTokenEndpoint(BaseEndpoint): valid_signature = self._check_signature(request, is_token_request=True) + # log the results to the validator_log + # this lets us handle internal reporting and analysis + request.validator_log['client'] = valid_client + request.validator_log['resource_owner'] = valid_resource_owner + request.validator_log['verifier'] = valid_verifier + request.validator_log['signature'] = valid_signature + # We delay checking validity until the very end, using dummy values for # calculations and fetching secrets/keys to ensure the flow of every # request remains almost identical regardless of whether valid values -- cgit v1.2.1