Class: OmniAuth::Strategies::Draugiem

Inherits:
Object
  • Object
show all
Includes:
OmniAuth::Strategy
Defined in:
lib/omniauth/strategies/draugiem.rb

Overview

Authenticate to draugiem.lv and frype.com and others.

Examples:

Basic Rails Usage


Add this to config/initializers/omniauth.rb

  Rails.application.config.middleware.use OmniAuth::Builder do
    provider :draugiem, 'App id', 'API Key'
  end

Basic Rack example


use Rack::Session::Cookie
use OmniAuth::Strategies::Draugiem, 'App id', 'API Key'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app, app_id, api_key) ⇒ Draugiem

Returns a new instance of Draugiem.



28
29
30
31
32
# File 'lib/omniauth/strategies/draugiem.rb', line 28

def initialize(app, app_id, api_key)
  super(app, :draugiem)
  @app_id   = app_id
  @api_key  = api_key
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



26
27
28
# File 'lib/omniauth/strategies/draugiem.rb', line 26

def api_key
  @api_key
end

#app_idObject

Returns the value of attribute app_id.



26
27
28
# File 'lib/omniauth/strategies/draugiem.rb', line 26

def app_id
  @app_id
end