mustard_client 0.1.20 → 0.1.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/MustardClient/users.rb +22 -0
- data/lib/MustardClient/version.rb +1 -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: e15d1f1f1c10d259f539a055c69c6beda53ba36a
|
4
|
+
data.tar.gz: ab20e6acb051c16c7bf7e97a039a14d8f5f23384
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b9e7b5f50694ce506a6bcf36381aa90021ac648944a7063563e2b416924c5fe66614a931c1fcb8eb11bb79d1ee092a2f0c008172cb077f3b781795279f2b28b
|
7
|
+
data.tar.gz: fefc8963b1011b7da2ce3a60de2cd14859e65676f08643de009bfe3736849e9348b9432dee59535f54c94fc7c2f8bea9fcb947d340bc5f45d44d5349d116ae5e
|
data/lib/MustardClient/users.rb
CHANGED
@@ -58,5 +58,27 @@ module MustardClient
|
|
58
58
|
execute(command)
|
59
59
|
|
60
60
|
end
|
61
|
+
|
62
|
+
def trigger_password_reset user_id, redirect_url
|
63
|
+
|
64
|
+
command = {}
|
65
|
+
command[:method] = :post
|
66
|
+
command[:route] = @mustard_url + "/users/#{user_id}/reset-password"
|
67
|
+
command[:params] = {'redirect-to' => redirect_url}
|
68
|
+
|
69
|
+
execute(command)
|
70
|
+
|
71
|
+
end
|
72
|
+
|
73
|
+
def reset_password user_id, password_token, new_password
|
74
|
+
|
75
|
+
command = {}
|
76
|
+
command[:method] = :post
|
77
|
+
command[:route] = @mustard_url + "/users/#{user_id}/reset-password/#{password_token}"
|
78
|
+
command[:params] = {'user' => {'password' => new_password}}
|
79
|
+
|
80
|
+
execute(command)
|
81
|
+
|
82
|
+
end
|
61
83
|
end
|
62
84
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mustard_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Watson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|