README.md in seraph-0.0.4 vs README.md in seraph-0.0.5
- old
+ new
@@ -1,7 +1,9 @@
# seraph
[](https://travis-ci.org/Szeliga/seraph)
+[](https://codeclimate.com/github/Szeliga/seraph)
+[](https://codeclimate.com/github/Szeliga/seraph/coverage)
A simple framework-agnostic library for authentication. seraph provides an API for implementing User authentication inside your app. It doesn't make any assumptions about your setup, so you do not have to have a `User` class that inherits from `ActiveRecord::Base`.
## Installation
@@ -56,19 +58,21 @@
# => "$2a$10$f1PWs.Qi3mtcL/fMaypEJu9HI0SchWLhsMd9kRhHEjP4v/3oqnB5G"
```
As a result you get the encrypted password, which you can be persisted in the database, alongside other user data (e-mail, login, etc.)
-### WIP - Comparing a provided password with the encrypted one
+### Comparing a provided password with the encrypted one
-Comparison is done using a constant-time secure comparison method, from the gem (fast_secure_compare)[https://github.com/daxtens/fast_secure_compare]
+Comparison is done using a constant-time secure comparison method from the gem (fast_secure_compare)[https://github.com/daxtens/fast_secure_compare]
To do it simply run:
``` ruby
Seraph::Authenticator.call(encrypted_password, plaintext_password)
# => true or false
```
+
+If the pepper was set in the configuration block, it will be automatically used in the comparison.
## Copyright
Copyright (c) 2016 Szymon Szeliga