applidget-oauth2 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 05aa7b5dfc529e46a0c60b09f49fed698652907e
4
- data.tar.gz: 00d9855f29cb3f2064b7d3ddae2a42764e1662e3
3
+ metadata.gz: de3aa12dd471a131b329b169d8dad857f03f929d
4
+ data.tar.gz: 716828bcdd319c2ea0bbf3e7a4146dcbb07586ea
5
5
  SHA512:
6
- metadata.gz: 7391cda0ba0b4e5066694f3a6f6d3bdb975e098f8ab89a0573eabe24deb14442f29119e7b852567f5bef200eabf0e48d0f0a35144b539545c71141ee1b63f483
7
- data.tar.gz: 51517ff15213b0f2df1ee87c1524f25fe566bd5b593c3e5e6d2521bf7be676a7e5382793edd7686e3885bf2a4d80d36ba407dd81d4471e1db2d3a731b2df6dd8
6
+ metadata.gz: 1fe064dd3d4ddcd3ae160318089f7b81356b934675f89aac549f13813da861f950e37379b7e4e5a06458c63576b55de76596430c7e386c11e94809dfc197b598
7
+ data.tar.gz: 4ed8927fee67565147706b38a57a0fc713f33c200988036c21e79e2f35b2d58e8c15944377cfa75930951a6ede16f0c888f25192e07152e95a52bc42f00e3599
@@ -11,7 +11,9 @@ module Applidget
11
11
  # model: "guest",
12
12
  # api: "/api/v1/me.json",
13
13
  # request_params: { hd: params[:hd], auth: params[:auth], scope: "public" },
14
- # callback_url: generic_url_from callback_guests_auth_applidget_accounts_path
14
+ # callback_url: generic_url_from callback_guests_auth_applidget_accounts_path,
15
+ # client_id: "785439208457639203847539208374",
16
+ # client_secret: "7468539205733452975829047568892"
15
17
  # }
16
18
  # end
17
19
  #
@@ -23,14 +25,12 @@ module Applidget
23
25
  # # your code ...
24
26
  # end
25
27
 
26
- before_filter :check_csrf, :only => [:callback]
27
-
28
28
  def request_uri(options)
29
29
  @options = options
30
30
  client.auth_code.authorize_url({:redirect_uri => @options[:callback_url]}.merge(request_params))
31
31
  end
32
32
 
33
- def access_token(options, params)
33
+ def api_response(options, params)
34
34
  @options = options
35
35
  @params = params
36
36
  if check_csrf
@@ -42,7 +42,7 @@ module Applidget
42
42
  private
43
43
 
44
44
  def client
45
- @client ||= ::OAuth2::Client.new(@options[:client_id], @options[:client_secret], { :site => @options[:provider_host] })
45
+ @client ||= ::OAuth2::Client.new(@options[:client_id], @options[:client_secret], { :site => "https://accounts.applidget.com" })
46
46
  end
47
47
 
48
48
  def build_access_token
@@ -1,5 +1,5 @@
1
1
  module Applidget
2
2
  module Oauth2
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: applidget-oauth2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - aymericbouzy
@@ -53,6 +53,7 @@ files:
53
53
  - README.md
54
54
  - Rakefile
55
55
  - applidget-oauth2-0.0.1.gem
56
+ - applidget-oauth2-0.0.2.gem
56
57
  - applidget-oauth2.gemspec
57
58
  - lib/applidget/oauth2.rb
58
59
  - lib/applidget/oauth2/version.rb