paper-auth 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +42 -4
- data/lib/paper-auth/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f42475d9bf632254522849def8e4ce785f66aa8d
|
4
|
+
data.tar.gz: e9a7daafd5c3f44c3beda0e11806e951240e47ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99304f54c3f9cd3893d133b438949ab4585e10a4121ef80c370b3ec433a450c8c001a1cf7d385e003030292296a92cd263f884b096eb482fc9b603b5a5e9f2f5
|
7
|
+
data.tar.gz: 463c396168c3fbd7095a2a1f36068976b51310e56965cd818ed8bb9b876b179cdc18abc0a1bb2c03a9449a0d9373924a6cd24fbf0c1a056d3f6e84eab89315a3
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
# Paper
|
1
|
+
# Paper-Auth
|
2
2
|
|
3
|
-
|
3
|
+
Paper-Auth is a paper based two factor authenctication.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -20,11 +20,49 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
-
|
23
|
+
### Initialize
|
24
|
+
|
25
|
+
Create a new instance of PaperAuth.
|
26
|
+
|
27
|
+
```
|
28
|
+
paper = PaperAuth.new()
|
29
|
+
```
|
30
|
+
|
31
|
+
Currently you do not need to provide any parameters.
|
32
|
+
|
33
|
+
### Create a PDF
|
34
|
+
|
35
|
+
Create a pdf using PaperAuth.
|
36
|
+
|
37
|
+
```
|
38
|
+
pdf = paper.create(0, "Hello World!")
|
39
|
+
```
|
40
|
+
|
41
|
+
The first parameter should be something specific to the user (Ex. User ID), and the second parameter should be a secret key that ONLY you know. When called, a pdf will be generated and saved in the current path that you are located in.
|
42
|
+
|
43
|
+
### Get an ID
|
44
|
+
|
45
|
+
You can easily request for an ID using PaperAuth.
|
46
|
+
|
47
|
+
```
|
48
|
+
id = paper.get()
|
49
|
+
```
|
50
|
+
|
51
|
+
Currently you do not need to provide any parameters. This will just generate a random ID (Ex. 1A, 10E, etc.) that you can request from the user.
|
52
|
+
|
53
|
+
### Verifying a Code
|
54
|
+
|
55
|
+
You can easily verify a two factor authentication code.
|
56
|
+
|
57
|
+
```
|
58
|
+
verify = paper.verify(0, "Hello World!", "1A", "1A2B3")
|
59
|
+
```
|
60
|
+
|
61
|
+
The first two parameters must be the exact same paramenters you used to generate the pdf. The third parameter is the ID that you generated from `paper.get()`, and the fourth parameter is what the user typed. This method will return true or false.
|
24
62
|
|
25
63
|
## Contributing
|
26
64
|
|
27
|
-
1. Fork it ( https://github.com/
|
65
|
+
1. Fork it ( https://github.com/nahtnam/paper-auth/fork )
|
28
66
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
29
67
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
30
68
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/lib/paper-auth/version.rb
CHANGED