Add OAuth usage information the API logs, have it be displayed in the logs UI and start on the code to display application information when clicked. Note that this does not (yet) do anything with the information returned as we need to wait for the mainline merge of Angular 1.2.9 (which is in master) before I can continue on the display

This commit is contained in:
Joseph Schorr 2014-03-18 16:45:18 -04:00
parent e1b704bdac
commit 9ae4506a0d
8 changed files with 104 additions and 8 deletions

View file

@ -14,7 +14,7 @@ from data.model import oauth
from app import app
from permissions import QuayDeferredPermissionUser
from auth_context import (set_authenticated_user, set_validated_token,
set_authenticated_user_deferred)
set_authenticated_user_deferred, set_validated_oauth_token)
from util.http import abort
@ -140,7 +140,9 @@ def process_oauth(f):
scope_set = scopes.scopes_from_scope_string(validated.scope)
logger.debug('Successfully validated oauth access token: %s with scope: %s', token,
scope_set)
set_authenticated_user(validated.authorized_user)
set_validated_oauth_token(validated)
new_identity = QuayDeferredPermissionUser(validated.authorized_user.username, 'username',
scope_set)