rotp 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +6 -0
- data/lib/rotp/otp.rb +0 -2
- data/lib/rotp/totp.rb +1 -1
- data/lib/rotp/version.rb +1 -1
- data/rotp.gemspec +4 -4
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2725d64c9f5c1dd2c64165cced04357972e269c2
|
4
|
+
data.tar.gz: 4396a34a9e33102c800cfcc7815db87fcf1c612a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb6e0c9f09dc0bb9a48d53dd883ad53be3ea63b1fe0abddf8370537ccd859d5826c6a95570dc4a647c4f8592ae9520e3bf5bd2f073beb3f82cc07274cc93de27
|
7
|
+
data.tar.gz: 7af5f0b49b5b1de78dad69d89b4b52a4369f79304b8d48f47a9f760f46839705c6359d1af5475476d0d31b85614488f34a63ad0213134ba74f95998a8cb1f441
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -35,6 +35,12 @@ sleep 30
|
|
35
35
|
totp.verify("492039") # => false
|
36
36
|
```
|
37
37
|
|
38
|
+
Optionally, you can provide an issuer which will be used as a title in Google Authenticator.
|
39
|
+
|
40
|
+
```ruby
|
41
|
+
totp = ROTP::TOTP.new("base32secret3232", issuer: "My Service")
|
42
|
+
```
|
43
|
+
|
38
44
|
### Counter based OTP's
|
39
45
|
|
40
46
|
```ruby
|
data/lib/rotp/otp.rb
CHANGED
data/lib/rotp/totp.rb
CHANGED
@@ -54,7 +54,7 @@ module ROTP
|
|
54
54
|
# @return [String] provisioning uri
|
55
55
|
def provisioning_uri(name)
|
56
56
|
encode_params("otpauth://totp/#{URI.encode(name)}",
|
57
|
-
:period => (interval==30 ? nil : interval), :issuer => issuer
|
57
|
+
:secret => secret, :period => (interval==30 ? nil : interval), :issuer => issuer)
|
58
58
|
end
|
59
59
|
|
60
60
|
private
|
data/lib/rotp/version.rb
CHANGED
data/rotp.gemspec
CHANGED
@@ -20,8 +20,8 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
21
21
|
s.require_paths = ["lib"]
|
22
22
|
|
23
|
-
s.add_development_dependency 'guard-rspec', '~> 4.5
|
24
|
-
s.add_development_dependency 'rake', '~> 10.4
|
25
|
-
s.add_development_dependency 'rspec', '~> 3.1
|
26
|
-
s.add_development_dependency 'timecop', '~> 0.7
|
23
|
+
s.add_development_dependency 'guard-rspec', '~> 4.5'
|
24
|
+
s.add_development_dependency 'rake', '~> 10.4'
|
25
|
+
s.add_development_dependency 'rspec', '~> 3.1'
|
26
|
+
s.add_development_dependency 'timecop', '~> 0.7'
|
27
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rotp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Percival
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard-rspec
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.5
|
19
|
+
version: '4.5'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.5
|
26
|
+
version: '4.5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 10.4
|
33
|
+
version: '10.4'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 10.4
|
40
|
+
version: '10.4'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 3.1
|
47
|
+
version: '3.1'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 3.1
|
54
|
+
version: '3.1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: timecop
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.7
|
61
|
+
version: '0.7'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.7
|
68
|
+
version: '0.7'
|
69
69
|
description: Works for both HOTP and TOTP, and includes QR Code provisioning
|
70
70
|
email:
|
71
71
|
- mark@markpercival.us
|
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
137
|
version: '0'
|
138
138
|
requirements: []
|
139
139
|
rubyforge_project: rotp
|
140
|
-
rubygems_version: 2.
|
140
|
+
rubygems_version: 2.2.2
|
141
141
|
signing_key:
|
142
142
|
specification_version: 4
|
143
143
|
summary: A Ruby library for generating and verifying one time passwords
|