Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified scope definitions and changed to use "expires_in_seconds" #152

Closed
wants to merge 2 commits into from

Conversation

skavanagh
Copy link
Contributor

From

http://openshift.github.io/documentation/rest_api/rest-api-1-6.html#authorization

The default scopes are

session - Equivalent of logging into an account with normal login credentials such as user name and password.
read - Access to the API is read-only, while authorization endpoints cannot be read.
userinfo - Only read access to the /user API resource is provided.

I know I confused things by having "sesson read" (which I think just means "session") in one of my unit tests. I was just trying to see if they could be combined. I added the scopes and a couple of unit tests to check permissions.

Also, "expires_in" returns the expiration time that was originally set for the authorization. "expires_in_seconds" returns the time remaining. So I think we would want that one.

Thanks!

@skavanagh skavanagh changed the title Expires scopes branch Modified scope definitions and changed to use "expires_in_seconds" Sep 20, 2014
Defined session, read, and userinfo scopes. Added unit test to check
scope permissions and expired token
Modified to use 'expires_in_seconds' which returns the remaining time
for the authorization.
@adietish
Copy link
Member

adietish commented Oct 6, 2014

Great, thanks! rebasing and merging...

@adietish
Copy link
Member

adietish commented Oct 6, 2014

nice patch, thanks!
squashed and rebased: #163

@adietish adietish closed this Oct 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants