Class: OmniAuth::Strategies::Gowalla

Inherits:
OAuth2
  • Object
show all
Defined in:
lib/omniauth/strategies/gowalla.rb

Overview

Authenticate to Gowalla utilizing OAuth 2.0 and retrieve basic user information.

Examples:

Basic Usage

use OmniAuth::Strategies::Gowalla, 'API Key', 'Secret Key'

Instance Attribute Summary

Attributes inherited from OAuth2

#client_id, #client_options, #client_secret, #options

Instance Method Summary collapse

Methods inherited from OAuth2

#callback_url, #client

Constructor Details

#initialize(app, api_key = nil, secret_key = nil, options = {}, &block) ⇒ Gowalla

Returns a new instance of Gowalla.

Parameters:

  • app (Rack Application)

    standard middleware application parameter

  • api_key (String) (defaults to: nil)

    the application id as registered on Gowalla

  • secret_key (String) (defaults to: nil)

    the application secret as registered on Gowalla

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :scope ('read', 'read-write') — default: 'read'

    the scope of your authorization request; must be read or read-write



17
18
19
20
21
22
23
24
25
# File 'lib/omniauth/strategies/gowalla.rb', line 17

def initialize(app, api_key = nil, secret_key = nil, options = {}, &block)
  client_options = {
    :site => 'https://api.gowalla.com/api/oauth',
    :authorize_url => 'https://gowalla.com/api/oauth/new',
    :access_token_url => 'https://api.gowalla.com/api/oauth/token'
  }

  super(app, :gowalla, api_key, secret_key, client_options, options, &block)
end