auth-lh 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/auth/lh/version.rb +1 -1
- data/lib/auth_lh.rb +5 -1
- data/lib/auth_lh/authentication.rb +5 -1
- data/lib/auth_lh/user.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6771f268ea847a43579f9acb8e2ff4db2239cf3c
|
|
4
|
+
data.tar.gz: b5d0bafe66d46a32941558e0743e7215d0ac9eee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2e26df4871dda93dc2fe505fe84126f8baf1564b648d9e465fff5520e5fa9f60585799d24d31f1622b7f2e943d1fba4cfdea51b59d0b308f8b9373533e743600
|
|
7
|
+
data.tar.gz: 0d21e3e3b7f003a602349fe2864d8d3019a49f0e0601ec6c19d5eae0477fc02c02e1e24ab8ea4421f4de05c66bb00452a0674ec9d319e9422bd0d18d07dcf2d4
|
data/CHANGELOG.md
CHANGED
data/lib/auth/lh/version.rb
CHANGED
data/lib/auth_lh.rb
CHANGED
|
@@ -46,7 +46,11 @@ module AuthLh
|
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
def self.logout_url
|
|
49
|
-
"#{@endpoint}/logout?
|
|
49
|
+
"#{@endpoint}/logout?return_url=#{CGI::escape(@return_url)}"
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def self.change_password_url
|
|
53
|
+
"#{@endpoint}/change_password?return_url=#{CGI::escape(@return_url)}"
|
|
50
54
|
end
|
|
51
55
|
|
|
52
56
|
protected
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module AuthLh
|
|
2
2
|
module Authentication
|
|
3
3
|
def self.included(base)
|
|
4
|
-
|
|
4
|
+
base.extend(ClassMethods)
|
|
5
5
|
end
|
|
6
6
|
|
|
7
7
|
def auth_user
|
|
@@ -64,6 +64,10 @@ module AuthLh
|
|
|
64
64
|
def logout_url
|
|
65
65
|
AuthLh.logout_url
|
|
66
66
|
end
|
|
67
|
+
|
|
68
|
+
def change_password_url
|
|
69
|
+
AuthLh.change_password_url
|
|
70
|
+
end
|
|
67
71
|
end
|
|
68
72
|
end
|
|
69
73
|
end
|
data/lib/auth_lh/user.rb
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
module AuthLh
|
|
2
2
|
class User
|
|
3
3
|
attr_accessor :code, :email, :jabber, :name, :login,
|
|
4
|
-
:shop_code, :enabled, :role_codes
|
|
4
|
+
:shop_code, :enabled, :role_codes, :password_expired
|
|
5
5
|
|
|
6
6
|
def initialize(attributes={})
|
|
7
7
|
attributes.each do |k,v|
|
|
8
8
|
self.send("#{k}=", v)
|
|
9
9
|
end
|
|
10
10
|
end
|
|
11
|
+
|
|
12
|
+
def password_expired?
|
|
13
|
+
password_expired == true
|
|
14
|
+
end
|
|
11
15
|
end
|
|
12
16
|
end
|
|
13
17
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: auth-lh
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matias Hick
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-06-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|