Homec4science

OAuth Server enhancements -- more complete access token response and groundwork…

Authored by Bob Trahan <bob.trahan@gmail.com> on Feb 21 2012, 23:28.

Description

OAuth Server enhancements -- more complete access token response and groundwork for scope

Summary:
this patch makes the access token response "complete" relative to spec by
returning when it expires AND that the token_type is in fact 'Bearer'.

This patch also lays the groundwork for scope by fixing the underlying data
model and adding the first scope checks for "offline_access" relative to expires
and the "whoami" method. Further, conduit is augmented to open up individual
methods for access via OAuth generally to enable "whoami" access. There's also
a tidy little scope class to keep track of all the various scopes we plan to
have as well as strings for display (T849 - work undone)

Somewhat of a hack but Conduit methods by default have SCOPE_NOT_ACCESSIBLE. We
then don't even bother with the OAuth stuff within conduit if we're not supposed
to be accessing the method via Conduit. Felt relatively clean to me in terms
of additional code complexity, etc.

Next up ends up being T848 (scope in OAuth) and T849 (let user's authorize
clients for specific scopes which kinds of needs T850). There's also a bunch of
work that needs to be done to return the appropriate, well-formatted error
codes. All in due time...!

Test Plan:
verified that an access_token with no scope doesn't let me see
anything anymore. :( verified that access_tokens made awhile ago expire. :(

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Maniphest Tasks: T888, T848

Differential Revision: https://secure.phabricator.com/D1657

Details

Committed
Bob Trahan <bob.trahan@gmail.com>Feb 22 2012, 01:33
Pushed
aubortJan 31 2017, 17:16
Parents
rPH228c3781a2f1: Add gRaphael charting library
Branches
Unknown
Tags
Unknown

Event Timeline

Bob Trahan <bob.trahan@gmail.com> committed rPHaf295e0b2620: OAuth Server enhancements -- more complete access token response and groundwork… (authored by Bob Trahan <bob.trahan@gmail.com>).Feb 22 2012, 01:33