Google OAuth2.0 - velruse.providers.google_oauth2 — Velruse 1.1 documentation

### Navigation

- index
- modules |
- next |
- previous |
- Velruse 1.1 documentation »
- Provider Documentation »
- Google »

# Google OAuth2.0 - `velruse.providers.google_oauth2`

Google Developer Links:

- Google Application Management
- Configuring OAuth2.0 in Your Application

## Settings

`consumer_key`
  Google application consumer key.
`consumer_secret`
  Google application consumer secret.
`scope`
  Authorization scope.

## POST Parameters

Complete Example:

    <form action="/velruse/google/login" method="post">
        <input type="submit" value="Login with Google" />
    </form>

## Pyramid API

class `GoogleAuthenticationComplete`(profile=None, credentials=None, provider_name=None, provider_type=None)

  Bases: `velruse.AuthenticationComplete`

  Google OAuth 2.0 auth complete

`includeme`(config)

  Activate the `google_oauth2` Pyramid plugin via `config.include('velruse.providers.google_oauth2')`. After included, two new methods will be available to configure new providers.

  `config.add_google_oauth2_login()`
    See `add_google_login()` for the supported options.

  `config.add_google_oauth2_login_from_settings()`

`add_google_login`(config, consumer_key=None, consumer_secret=None, scope=None, login_path='/login/google', callback_path='/login/google/callback', name='google')

  Add a Google login provider to the application supporting the new OAuth2 protocol.

### Navigation

- index
- modules |
- next |
- previous |
- Velruse 1.1 documentation »
- Provider Documentation »
- Google »