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

Add list of authorized scopes to tokens object #2

Open
pavelsr opened this issue Nov 12, 2016 · 1 comment
Open

Add list of authorized scopes to tokens object #2

pavelsr opened this issue Nov 12, 2016 · 1 comment

Comments

@pavelsr
Copy link
Owner

pavelsr commented Nov 12, 2016

Old:

"tokens": {
        "[email protected]": {
            "refresh_token": "1/cI5jWSVnsUyCbasCQpDmz8uhQyfnWWphxvb1ST3oTHE",
            "access_token": "ya29.Ci-KA8aJYEAyZoxkMsYbbU9H_zj2t9-7u1aKUtrOtak3pDhJvCEPIdkW-xg2lRQdrA"
        },
        "[email protected]": {
            "access_token": "ya29.Ci-KAzT9JpaPriZ-ugON4FnANBXZexTZOz-E6U4M-hjplbIcMYpTbo0AmGV__tV5FA",
            "refresh_token": "1/_37lsRFSRaUJkAAAuJIRXRUueft5eLWaIsJ0lkJmEMU"
        }
    }

New:

"tokens": {
        "[email protected]": {
            "refresh_token": "1/cI5jWSVnsUyCbasCQpDmz8uhQyfnWWphxvb1ST3oTHE",
            "access_token": "ya29.Ci-KA8aJYEAyZoxkMsYbbU9H_zj2t9-7u1aKUtrOtak3pDhJvCEPIdkW-xg2lRQdrA",
           "authorized_scopes":  [ "email", "profile", "https://www.googleapis.com/auth/calendar" ]
        },
        "[email protected]": {
            "access_token": "ya29.Ci-KAzT9JpaPriZ-ugON4FnANBXZexTZOz-E6U4M-hjplbIcMYpTbo0AmGV__tV5FA",
            "refresh_token": "1/_37lsRFSRaUJkAAAuJIRXRUueft5eLWaIsJ0lkJmEMU",
            "authorized_scopes":  [ "email"  ]
        }
    }
@pscott-au
Copy link

In WebService::GoogleAPI::Client I decided to include the scopes above the users in the hierarchy.
The reasoning for this is that the scopes are typically defined at the project level and although user access will typically include a subset of these, it is probably more convenient to manage multiple differently scoped files for a project rather than define them in the config file which requires the management of scopes in a more complicated way at the web auth collection stage.

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

No branches or pull requests

2 participants