-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Adding 3-legged auth for users getting started. #539
Conversation
substituting @anthmgoogle in my place, who has more feelings about 3LO |
def _store_user_credential(credential): | ||
"""Stores a user credential as a well-known file. | ||
|
||
Prompts user first if they want to store the minted token and |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Addresses final part of googleapis#335.
@dhermes There is a getting started section on the landing page, that is currently explaining how to install the package, maybe we can add it there. Alternatively, we could add it to the " in 10 seconds" expandables of each top-level module (e.g. Cloud Datastore) |
print 'function, which relies on that environment variable.' | ||
print '' | ||
print 'Keep in mind, the refresh token can only be used with the' | ||
print 'scopes you granted in the original authorization.' |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Now that I think about it, the process described in the docstring for @silvolu Do we really need / want user 3LO? I can see cases where someone would want to write a CLI application and have users go through a flow, but we support plugging in arbitrary credentials to our |
I provided some comments on the implementation. I think a GCloud-specific wrapper for 3LO is relatively low priority, since One thing that may not be widely known yet is that you can actually now use That being said, I do belive there is a need for better 3L0 libraries, On Wed, Jan 14, 2015 at 1:04 PM, Danny Hermes notifications@github.com
|
@anthmgoogle that hits it exactly on the head! I somehow forgot that I am going to close this and we can discuss the best way to document it in #335. |
Source-Link: https://togithub.com/googleapis/synthtool/commit/eaef28efd179e6eeb9f4e9bf697530d074a6f3b9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f8ca7655fa8a449cadcabcbce4054f593dcbae7aeeab34aa3fcc8b5cf7a93c9e
* fix: Add async context manager return types chore: Mock return_value should not populate oneof message fields chore: Support snippet generation for services that only support REST transport chore: Update gapic-generator-python to v1.11.0 PiperOrigin-RevId: 545430278 Source-Link: googleapis/googleapis@601b532 Source-Link: googleapis/googleapis-gen@b3f18d0 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjNmMThkMGY2NTYwYTg1NTAyMmZkMDU4ODY1ZTc2MjA0NzlkN2FmOSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* fix: Add async context manager return types chore: Mock return_value should not populate oneof message fields chore: Support snippet generation for services that only support REST transport chore: Update gapic-generator-python to v1.11.0 PiperOrigin-RevId: 545430278 Source-Link: googleapis/googleapis@601b532 Source-Link: googleapis/googleapis-gen@b3f18d0 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjNmMThkMGY2NTYwYTg1NTAyMmZkMDU4ODY1ZTc2MjA0NzlkN2FmOSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* docs: Minor formatting chore: Update gapic-generator-python to v1.11.5 build: Update rules_python to 0.24.0 PiperOrigin-RevId: 563436317 Source-Link: googleapis/googleapis@42fd37b Source-Link: googleapis/googleapis-gen@280264c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjgwMjY0Y2EwMmZiOTMxNmI0MjM3YTk2ZDBhZjFhMjM0M2E4MWE1NiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Addresses final part of #335.
@tseaver Writing
Test_get_credentials_from_user_flow.test_succeeds
made me feel icky inside. Any suggestions on how to make this less massive?@silvolu PTAL at the docstrings introduced and the print statements. Should we put this somewhere special in our documentation? We don't have an auth or a getting started section anywhere but I encourage you to clone my repo, check out the
add-3LO
branch and runFirst without a client secrets file present (to test failure modes) and then with one (to test the messages printed, inputs requested).
@craigcitro Also PTAL / see what we could pull into
oauth2client
.