Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Add basic user guide#79

Merged
theacodes merged 2 commits intomasterfrom
usage-docs
Nov 10, 2016
Merged

Add basic user guide#79
theacodes merged 2 commits intomasterfrom
usage-docs

Conversation

@theacodes
Copy link
Contributor

These are staged here: http://temp.theadora.io/google-auth/index.html

Resolves #44.

@theacodes theacodes added this to the 1.0.0 milestone Nov 8, 2016
- Support for various transports, including
:mod:`Requests <google.auth.transport.requests>`,
:mod:`urllib3 <google.auth.transport.urllib3>`, and
:mod:`gRPC <google.auth.transport.grpc>`.

This comment was marked as spam.

This comment was marked as spam.

docs/index.rst Outdated
Installing
----------

google-auth can be installed with `pip <https://pip.pypa.io>`_::

This comment was marked as spam.

This comment was marked as spam.

docs/index.rst Outdated

google-auth can be installed with `pip <https://pip.pypa.io>`_::

$ pip install google-auth

This comment was marked as spam.

This comment was marked as spam.

User Guide
==========

.. currentmodule:: google.auth

This comment was marked as spam.

This comment was marked as spam.

user accounts are obtained by asking the user to authorize access to their data.
These types of credentials are used in cases where your application needs access
to a user's data in another service, such as accessing a user's documents in
Google Drive.

This comment was marked as spam.

This comment was marked as spam.

User credentials are typically obtained via `OAuth 2.0`_. This library does not
provide any support for *obtaining* user credentials, however, you can use user
credentials with this library. You can use libraries such as `oauthlib`_ or
`oauth2client`_ to obtain the access token. After you have an access token, you

This comment was marked as spam.

This comment was marked as spam.

.. _Requests: http://docs.python-requests.org/en/master/
.. _Session: http://docs.python-requests.org/en/master/user/advanced/#session-objects

Urllib3

This comment was marked as spam.

This comment was marked as spam.

import google.auth.transport.grpc
import google.auth.transport.requests

http_request = google.auth.transport.requests.Request()

This comment was marked as spam.

This comment was marked as spam.

credentials, 'pubsub.googleapis.com:443', http_request)

.. note:: Even though gRPC is its own transport, you still need to use one of
the other HTTP transports with gRPC. The reason is that most credential

This comment was marked as spam.

This comment was marked as spam.

ssl_credentials, google_auth_credentials)

channel = grpc.secure_channel(
'pubsub.googleapis.com:443', composite_credentials)

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Nov 10, 2016

LGTM

@theacodes theacodes merged commit 53c7b17 into master Nov 10, 2016
@theacodes theacodes deleted the usage-docs branch November 10, 2016 18:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants