omniauth-your-membership-token 1.1.1 → 1.1.2

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: 777f53a5242cc54482772e784a321ac64e9e1594
4
- data.tar.gz: 6c9522bd5bef1f99863b236019510c3ae8fa3518
3
+ metadata.gz: a3e72458def061151d23a7bc5c8f70a944fce061
4
+ data.tar.gz: ba57375bb44a13a4be124a369118f33689e32e9b
5
5
  SHA512:
6
- metadata.gz: b6c92f96e2951fd502858a272a0e652bbe03e7502ffd50130cc36d23f5e544f7dfb46ea8d0a8d2bf16ab3b3e16741ca5d1600edda8e99abeeb3ba29cfdfdd37b
7
- data.tar.gz: cbecdb48595f07f4cf5d15b4498a6d1da9c4ff852603e8d7fd457397955e8f79ce492325419bea97fe7c8775b5302eecdd5bff8843c4b0929109fe8bc4fc8ba6
6
+ metadata.gz: 360b7f3f30aa07ed16286d6a080a21fac074d4c1a7b456a04079fcee63298ead7802abb6297eb1df524e1fc6e3b24b370d6fbc9464ed9210aebd9b6cdc4c59a2
7
+ data.tar.gz: d66609aa1877c9c54c1f57a93b54c32e4ae9da204b8e7529c1ad592440ee4b5c8aff1541ad5accfc39825b685e751f5072beb5bf3fc84ed2301de853e55510b5
@@ -0,0 +1,15 @@
1
+ # Change Log
2
+ All notable changes to this project will be documented in this file.
3
+ This project adheres to [Semantic Versioning](http://semver.org/).
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [1.1.2]
8
+ ### Changed
9
+ - In request phase, convert `SocketError` into an OmniAuth failure.
10
+ This allows for easier handling in application code.
11
+
12
+ ## [1.1.1] - 2017-02-16
13
+ ### Breaking
14
+ - Require omniauth 1.3.2+ or 1.4+ (for compatibility with
15
+ https://github.com/omniauth/omniauth/commit/71866c5264122e196847a3980c43051446a03e9b)
@@ -17,15 +17,18 @@ module OmniAuth
17
17
  # the name of the class. This returns an uncapitalized url which Rails will not recognize as the same path as the
18
18
  # devise controller. This is a forced way to do this and probably has a more elegant solution.
19
19
  options.name = 'yourMembershipToken'
20
- # Build an Access Token
21
- session = YourMembership::Session.create
22
- #binding.pry
23
- token_hash = session.createToken(:RetUrl => callback_url)
24
-
25
- # Pass the YourMembership session id to the Callback
26
- request.GET['ym_session'] = session.to_s
27
- # Redirect to token url
28
- redirect token_hash['GoToUrl']
20
+
21
+ begin
22
+ # Build an Access Token
23
+ session = YourMembership::Session.create
24
+ token_hash = session.createToken(:RetUrl => callback_url)
25
+ # Pass the YourMembership session id to the Callback
26
+ request.GET['ym_session'] = session.to_s
27
+ # Redirect to token url
28
+ redirect token_hash['GoToUrl']
29
+ rescue SocketError => e
30
+ fail! e.message
31
+ end
29
32
  end
30
33
 
31
34
  def callback_phase
@@ -33,7 +36,7 @@ module OmniAuth
33
36
 
34
37
  ym_session_id = request.env['omniauth.params']['ym_session']
35
38
 
36
- ym_session = YourMembership::Session.new(ym_session_id, 100)
39
+ ym_session = YourMembership::Session.new(ym_session_id, 100)
37
40
 
38
41
  begin
39
42
  fail! 'Failed To Log In' unless ym_session.authenticated?
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module YourMembershipToken
3
- VERSION = "1.1.1"
3
+ VERSION = "1.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-your-membership-token
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nate Flood
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-16 00:00:00.000000000 Z
11
+ date: 2017-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -81,6 +81,7 @@ extensions: []
81
81
  extra_rdoc_files: []
82
82
  files:
83
83
  - ".gitignore"
84
+ - CHANGELOG.md
84
85
  - Gemfile
85
86
  - LICENSE.txt
86
87
  - README.md