seraph 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +50 -0
- data/README.md +3 -3
- data/lib/seraph/{authenticator.rb → password_comparator.rb} +1 -1
- data/lib/seraph/version.rb +1 -1
- data/lib/seraph.rb +2 -1
- data/spec/seraph/{authenticator_spec.rb → password_comparator_spec.rb} +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0c5b528af66d8492d4b07fd0a4bef04393ad2b7
|
4
|
+
data.tar.gz: 9e64923eee16af78668b09ff6ba3e000480d949d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 999a809aad9e97ab40237cef802fb76f82e107689c7c8d742c1a7513c777951e37667d0a4f5e2b7560757f530be43912353fb2e3951dc7a5424cafa1a72f3871
|
7
|
+
data.tar.gz: 8ccb76da11f76ca77ab496d5398ef6c6cbf682e68e85c2cf0b784ded83b4ba940f6ad4ad8fd58c37f09b6a7b388d7d43998f0233b1810fd8b1afb0d3b3bd7cb4
|
data/.gitignore
CHANGED
@@ -3,3 +3,53 @@
|
|
3
3
|
/html/
|
4
4
|
/pkg/
|
5
5
|
/vendor/cache/*.gem
|
6
|
+
*.gem
|
7
|
+
*.rbc
|
8
|
+
/.config
|
9
|
+
/coverage/
|
10
|
+
/InstalledFiles
|
11
|
+
/pkg/
|
12
|
+
/spec/reports/
|
13
|
+
/spec/examples.txt
|
14
|
+
/test/tmp/
|
15
|
+
/test/version_tmp/
|
16
|
+
/tmp/
|
17
|
+
|
18
|
+
# Used by dotenv library to load environment variables.
|
19
|
+
# .env
|
20
|
+
|
21
|
+
## Specific to RubyMotion:
|
22
|
+
.dat*
|
23
|
+
.repl_history
|
24
|
+
build/
|
25
|
+
*.bridgesupport
|
26
|
+
build-iPhoneOS/
|
27
|
+
build-iPhoneSimulator/
|
28
|
+
|
29
|
+
## Specific to RubyMotion (use of CocoaPods):
|
30
|
+
#
|
31
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
32
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
33
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
34
|
+
#
|
35
|
+
# vendor/Pods/
|
36
|
+
|
37
|
+
## Documentation cache and generated files:
|
38
|
+
/.yardoc/
|
39
|
+
/_yardoc/
|
40
|
+
/doc/
|
41
|
+
/rdoc/
|
42
|
+
|
43
|
+
## Environment normalization:
|
44
|
+
/.bundle/
|
45
|
+
/vendor/bundle
|
46
|
+
/lib/bundler/man/
|
47
|
+
|
48
|
+
# for a library or gem, you might want to ignore these files since the code is
|
49
|
+
# intended to run in multiple environments; otherwise, check them in:
|
50
|
+
# Gemfile.lock
|
51
|
+
# .ruby-version
|
52
|
+
# .ruby-gemset
|
53
|
+
|
54
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
55
|
+
.rvmrc
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# Seraph
|
2
2
|
[![Build Status](https://travis-ci.org/Szeliga/seraph.svg?branch=master)](https://travis-ci.org/Szeliga/seraph)
|
3
3
|
[![Code Climate](https://codeclimate.com/github/Szeliga/seraph/badges/gpa.svg)](https://codeclimate.com/github/Szeliga/seraph)
|
4
4
|
[![Test Coverage](https://codeclimate.com/github/Szeliga/seraph/badges/coverage.svg)](https://codeclimate.com/github/Szeliga/seraph/coverage)
|
@@ -62,12 +62,12 @@ As a result you get the encrypted password, which you can be persisted in the da
|
|
62
62
|
|
63
63
|
### Comparing a provided password with the encrypted one
|
64
64
|
|
65
|
-
Comparison is done using a constant-time secure comparison method from the gem (
|
65
|
+
Comparison is done using a constant-time secure comparison method from the gem [fast_secure_compare](https://github.com/daxtens/fast_secure_compare)
|
66
66
|
|
67
67
|
To do it simply run:
|
68
68
|
|
69
69
|
``` ruby
|
70
|
-
Seraph::
|
70
|
+
Seraph::PasswordComparator.call(encrypted_password, plaintext_password)
|
71
71
|
# => true or false
|
72
72
|
```
|
73
73
|
|
data/lib/seraph/version.rb
CHANGED
data/lib/seraph.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
-
require 'seraph/
|
2
|
+
require 'seraph/password_comparator'
|
3
3
|
require 'seraph/password_encryptor'
|
4
4
|
|
5
|
-
RSpec.describe Seraph::
|
5
|
+
RSpec.describe Seraph::PasswordComparator do
|
6
6
|
describe '.call' do
|
7
7
|
let(:plaintext) { 'foobar12' }
|
8
8
|
let(:encrypted) { Seraph::PasswordEncryptor.call(plaintext).to_s }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: seraph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Szymon Szeliga
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bcrypt
|
@@ -155,13 +155,13 @@ files:
|
|
155
155
|
- README.md
|
156
156
|
- Rakefile
|
157
157
|
- lib/seraph.rb
|
158
|
-
- lib/seraph/authenticator.rb
|
159
158
|
- lib/seraph/configuration.rb
|
159
|
+
- lib/seraph/password_comparator.rb
|
160
160
|
- lib/seraph/password_encryptor.rb
|
161
161
|
- lib/seraph/utils.rb
|
162
162
|
- lib/seraph/version.rb
|
163
163
|
- seraph.gemspec
|
164
|
-
- spec/seraph/
|
164
|
+
- spec/seraph/password_comparator_spec.rb
|
165
165
|
- spec/seraph/password_encryptor_spec.rb
|
166
166
|
- spec/seraph_spec.rb
|
167
167
|
- spec/spec_helper.rb
|
@@ -191,7 +191,7 @@ signing_key:
|
|
191
191
|
specification_version: 4
|
192
192
|
summary: A simple framework-agnostic library for authentication
|
193
193
|
test_files:
|
194
|
-
- spec/seraph/
|
194
|
+
- spec/seraph/password_comparator_spec.rb
|
195
195
|
- spec/seraph/password_encryptor_spec.rb
|
196
196
|
- spec/seraph_spec.rb
|
197
197
|
- spec/spec_helper.rb
|