Class: OmniAuth::Strategies::PassaporteWeb

Inherits:
OAuth
  • Object
show all
Defined in:
lib/omni_auth_passaporte_web/passaporte_web.rb

Overview

Authenticate to Myfcid via OAuth and retrieve an access token for API usage

Usage:

use OmniAuth::Strategies::Myfcid, 'consumerkey', 'consumersecret', {:site=> 'http://stage.id.myfreecomm.com.br'}

Instance Method Summary collapse

Constructor Details

#initialize(app, consumer_key, consumer_secret, options = {}) ⇒ PassaporteWeb

Returns a new instance of PassaporteWeb.



14
15
16
17
18
19
20
21
22
23
# File 'lib/omni_auth_passaporte_web/passaporte_web.rb', line 14

def initialize(app, consumer_key, consumer_secret, options = {})
  @site = options.delete(:site) || 'https://sandbox.app.passaporteweb.com.br'
  super(app, :passaporte_web, consumer_key, consumer_secret,
          options.merge({:site => @site ,
          :request_token_path => "/sso/initiate",
          :authorize_path     => "/sso/authorize",
          :access_token_path  => "/sso/token",
          :signature_method => "PLAINTEXT"
        }))
end

Instance Method Details

#auth_hashObject



25
26
27
28
29
30
31
32
33
# File 'lib/omni_auth_passaporte_web/passaporte_web.rb', line 25

def auth_hash
  OmniAuth::Utils.deep_merge(super, {
    'uid' => user_data['uuid'],
    'user_info' => ,
    'extra' => {
      'user_hash' => user_data
    }
  })
end