Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update docs to reflect current API for Google provider.

  • Loading branch information...
commit 8c7b8ab0b2a3d18a6efb8c67334299e1345fde96 1 parent b9ee3f1
Warren Turkal authored
Showing with 37 additions and 14 deletions.
  1. +18 −5 docs/overview.rst
  2. +19 −9 docs/providers.rst
View
23 docs/overview.rst
@@ -45,16 +45,29 @@ Velruse looks like this:
Using in a Pyramid App
======================
-config.includeme('velruse.providers.google')
-config.add_google_login(realm='http://www.example.com/')$
+.. code-block:: python
-Attempt login by visiting: http://www.example.com/login/google.
+ config.include('velruse.providers.google')
+ config.add_google_login(realm='http://www.example.com/')
+
+You can get the login url with :func:`velruse.api.login_url` like so:
+
+.. code-block:: python
+
+ login_url(request, 'google')
+
+In this case, the login url handler will be at
+http://www.example.com/login/google. Go to that url to login via the Google
+provider.
+
+.. warning::
+
+ In order to get working code examples, you will probably need to change the
+ realm to something sensible. Maybe "localhost" would work for testing.
Using Separate App as a Service
===============================
-blah
-
.. _RPXNow: http://rpxnow.com/
View
28 docs/providers.rst
@@ -113,6 +113,10 @@ Complete Example:
Google (velruse.providers.google)
==================================
+.. warning::
+
+ This provider currently doesn't support OAuth 2.0 workflow.
+
Google provides both basic OpenID using Attribute Exchange 2.0, as well
as a OpenID+OAuth hybrid that authenticates a user and completes OAuth
authentication to provide API access to Google services.
@@ -133,17 +137,23 @@ Google Developer Links:
Settings
--------
-The Google provider requires that an OpenID provider configuration be
-present in your configuration file in order to provide the ``Realm``
-and ``Store`` configuration values.
+The Google provider requires that an OpenID provider requires at least a
+realm to be provided. The realm must be a containing namespace for the callback
+URL.
+
+.. code-block:: python
+
+ config.include('velruse.providers.google')
+ config.add_google_login(realm='http://www.example.com/')
-The following are only required if using the OAuth hybrid:
+Other useful params for add_google_login:
-velruse.google.consumer_key
- The consumer key, e.g. `yourdomain.com`
-velruse.google.consumer_secret
- Consumer secret as specified
-velruse.google.oauth_scope
+* consumer_key: OAuth 1.0 key
+* consumer_secret: OAuth 1.0 secret
+* scope: OAuth 1.0 scope
+* login_path: path for login handler (default: /login/google)
+* callback_path: path for callback handler (default: /login/google/callback)
+* name: Unique identifier for this provider (default: google)
.. warning::
Please sign in to comment.
Something went wrong with that request. Please try again.