foreman-tasks-core 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/foreman_tasks_core/otp_manager.rb +6 -3
- data/lib/foreman_tasks_core/version.rb +1 -1
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4b67548426398091cbb39ff9623d99d06428dc9
|
4
|
+
data.tar.gz: b38377bc6d0141e75b5a62e313705dcc457a2388
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3f4ab872e17f93690727d675037bf5b4517bd040e29bb81f1aebe0d4faccf88172851fee61556e7963e4207d0b6cb1cb21e5aab416791955dec4c93f91fdf93
|
7
|
+
data.tar.gz: d35c6d473f2f6bde0395f91494557b4cdc60241d126bc8587a8221ddad5f731cb0a1bb489d0eeead39ae4f96628c3859a7ab23a77dea661ddf3d0cd3a2bdaded
|
@@ -6,12 +6,15 @@ module ForemanTasksCore
|
|
6
6
|
class << self
|
7
7
|
def generate_otp(username)
|
8
8
|
otp = SecureRandom.hex
|
9
|
-
|
10
|
-
@passwords[username] = otp.to_s
|
9
|
+
passwords[username] = otp.to_s
|
11
10
|
end
|
12
11
|
|
13
12
|
def drop_otp(username, password)
|
14
|
-
|
13
|
+
passwords.delete(username) if passwords[username] == password
|
14
|
+
end
|
15
|
+
|
16
|
+
def passwords
|
17
|
+
@password ||= {}
|
15
18
|
end
|
16
19
|
|
17
20
|
def authenticate(hash)
|
metadata
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman-tasks-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Nečas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
14
|
-
|
15
|
-
'
|
13
|
+
description: |
|
14
|
+
Common code used both at Forman and Foreman proxy regarding tasks
|
16
15
|
email:
|
17
16
|
- inecas@redhat.com
|
18
17
|
executables: []
|
@@ -52,7 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
52
51
|
version: '0'
|
53
52
|
requirements: []
|
54
53
|
rubyforge_project:
|
55
|
-
rubygems_version: 2.6.
|
54
|
+
rubygems_version: 2.6.12
|
56
55
|
signing_key:
|
57
56
|
specification_version: 4
|
58
57
|
summary: Common code used both at Forman and Foreman proxy regarding tasks
|