jaliss / securesocial

A module that provides OAuth, OAuth2 and OpenID authentication for Play Framework applications
http://www.securesocial.ws
Apache License 2.0
1.19k stars 512 forks source link

Store scope in OAuth2Info #596

Closed k4200 closed 6 years ago

k4200 commented 8 years ago

Some OAuth2 providers return "scope" along with the access token, which is part of the OAuth2 spec. This PR enables to store it in OAuth2Info so that the user application can utilize it.

This is useful especially for GitHub since it allows the user to obtain multiple access tokens, and some user applications should be interested in the scope of the access token that they get from the API. https://developer.github.com/v3/oauth/#multiple-tokens