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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dd7e856739f109695f9c99a36b55663fe99be636
4
- data.tar.gz: d378af2ef8091f2b6561fb9f81b5a5466fa0d32b
3
+ metadata.gz: 6771f268ea847a43579f9acb8e2ff4db2239cf3c
4
+ data.tar.gz: b5d0bafe66d46a32941558e0743e7215d0ac9eee
5
5
  SHA512:
6
- metadata.gz: ae70f8c99b839801959bc522e11ae90d0d8a2f0b46396da6a8ca8cb4d2fb632e58e4ccc40a31ea347ad755ea5053656ee1e24679ff2b48372d92143951b58de8
7
- data.tar.gz: d13e489626c0845ac357f83b9f3923f0bc9e7250e0eee87f1533cf586b76165d7154aed81be33bcdb40be0e30e9b68eff75425d0234de813d9fbbf74b6e1aba1
6
+ metadata.gz: 2e26df4871dda93dc2fe505fe84126f8baf1564b648d9e465fff5520e5fa9f60585799d24d31f1622b7f2e943d1fba4cfdea51b59d0b308f8b9373533e743600
7
+ data.tar.gz: 0d21e3e3b7f003a602349fe2864d8d3019a49f0e0601ec6c19d5eae0477fc02c02e1e24ab8ea4421f4de05c66bb00452a0674ec9d319e9422bd0d18d07dcf2d4
@@ -53,3 +53,7 @@
53
53
  ## v0.1.1
54
54
 
55
55
  * API Reorganization
56
+
57
+ ## v0.2.0
58
+
59
+ * Enable users to change password
@@ -1,5 +1,5 @@
1
1
  module Auth
2
2
  module Lh
3
- VERSION = "0.1.1"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -46,7 +46,11 @@ module AuthLh
46
46
  end
47
47
 
48
48
  def self.logout_url
49
- "#{@endpoint}/logout?return=#{CGI::escape(@return_url)}"
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
- base.extend(ClassMethods)
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
@@ -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.1.1
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-05-04 00:00:00.000000000 Z
11
+ date: 2014-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler