auth-lh 0.4.0 → 0.4.1

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: 20c4858e61f37e391405761067381bba5eae7def
4
- data.tar.gz: 15a5c9964e58316cd4a9721583163506e92661a4
3
+ metadata.gz: 1257430f1cf3a3f817471112650dc718eb5c49cf
4
+ data.tar.gz: 686131a353349a6009cd2e23a6b382cf8df62abb
5
5
  SHA512:
6
- metadata.gz: ae4ebd327dee06bbc6fac8afd7cf22ab97d18a26ffe24b22dfa1b78248f8832a3033e673117ce787b70ab463caef0922a64363e2f39edb1c74f575d454a5265f
7
- data.tar.gz: 903842eb9ac63dc87c15a82d1887ffb46943a58d7e9644aba403a8b70e5d4eb8e6e9a61f2d296f384d69f88e010eda8391bd18214da5a494f04cfe61e604f33f
6
+ metadata.gz: 9241f744f435b7263210fc149fe9aad80ebe9f431d9fa3cc4b87446aa7e930903058713ce7c1b5fec3e702ff3e642d6bcf6a01288aab226e1264711b37deb6b8
7
+ data.tar.gz: 0db3e37269b3ce75e341651b29716b01dd172653264e70d7d3c784f717355513c30792784ee86a5473f68b5178577248cd7ca5b221c6a7f399f5062941015a2c
data/CHANGELOG.md CHANGED
@@ -89,3 +89,7 @@
89
89
  ## v0.4.0
90
90
 
91
91
  * Improved auth interface
92
+
93
+ ## v0.4.1
94
+
95
+ * Changed field in session response
@@ -1,5 +1,5 @@
1
1
  module Auth
2
2
  module Lh
3
- VERSION = "0.4.0"
3
+ VERSION = "0.4.1"
4
4
  end
5
5
  end
@@ -29,7 +29,7 @@ module AuthLh
29
29
  response = AuthLh.get_current_user(session_token, remote_ip, return_url)
30
30
 
31
31
  logged_user = response.user
32
- @login_url = response.login_url
32
+ @destination_url = response.destination_url
33
33
 
34
34
  if logged_user
35
35
  user = find_or_create_by(login: logged_user.login)
@@ -41,7 +41,11 @@ module AuthLh
41
41
  end
42
42
 
43
43
  def login_url(return_url=nil)
44
- AuthLh.login_url(return_url)
44
+ if @destination_url.present?
45
+ @destination_url
46
+ else
47
+ AuthLh.login_url(return_url)
48
+ end
45
49
  end
46
50
 
47
51
  def logout_url(return_url=nil)
@@ -1,6 +1,6 @@
1
1
  module AuthLh
2
2
  class SessionResponse
3
- attr_accessor :user, :login_url
3
+ attr_accessor :user, :destination_url
4
4
 
5
5
  def initialize(attributes={})
6
6
  attributes.each do |k,v|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auth-lh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matias Hick