auther 2.2.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/README.md +16 -10
- data/lib/auther/version.rb +1 -1
- data/lib/generators/auther/templates/config/initializers/auther.rb +3 -3
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a66114fa344f0e0ce5003e241ee5a157b4e4abf1
|
4
|
+
data.tar.gz: 5689ed9bba3ed4dde0d4c084b64dcf4f8757e831
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0a3ac57b79d582af11f16b5678675c028194179c5b311f5e539061fe5c9b2eff73d9fbdcba186fcb6f7e321de46da93c42d21888abeaca4372f79c06dbf3440
|
7
|
+
data.tar.gz: fdf67d939a5225fb5841250014c22b6c3fc2754eede0b0727195699ba55e5fe5f03db03cf11441936b9653be616b0fd744df88ae4a2cf5b971a7e234ca601ede
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/README.md
CHANGED
@@ -59,12 +59,18 @@ Run the generator to configure and initialize your application:
|
|
59
59
|
|
60
60
|
# Usage
|
61
61
|
|
62
|
-
|
62
|
+
Assuming you are using the excellent [dotenv](https://github.com/bkeepers/dotenv) gem, add the following to your `.env`
|
63
|
+
settings:
|
64
|
+
|
65
|
+
AUTHER_SECRET=66is2tB4EbekG74DPGRmyQkdtZkQyNWZY6yeeNsmQ4Rpu42esdnP9X6puxpKfs64Gy2ghPu6QGTKsvQ73wXuDyWzDr
|
66
|
+
AUTHER_ADMIN_LOGIN=aHdMWUhiVGRyVHBPMmhTRWNRR082MFhNdVFkL2ZaSGpvY2VoVS90dGRpRT0tLXFBWWZDRkJ4aDR3Qy9aamNOeU1JekE9PQ==--bf077a68a8e654ed9e480851c9597dae57ec34b8
|
67
|
+
AUTHER_ADMIN_PASSWORD=VTloc285SVNrbnlHN0xhOTlMVEx6WnZ0VnFOMjFNWWdkZlRKdGVjZ1FtUT0tLTkrSDdweU1meVdFV1FIRnhpenZiK1E9PQ==--85c415da879ffab2491d37d767d108254d1ed57e
|
68
|
+
|
69
|
+
Launch your Rails application and visit the following:
|
63
70
|
|
64
71
|
http://localhost:3000/login
|
65
|
-
http://localhost:3000/admin/example # Assumes this route exists. Will redirect to /login if not authorized.
|
66
72
|
|
67
|
-
Use
|
73
|
+
Use these credentials to login:
|
68
74
|
|
69
75
|
* Login: test@test.com
|
70
76
|
* Password: password
|
@@ -80,17 +86,17 @@ The initializer (installed during setup) can be found here:
|
|
80
86
|
The initializer comes installed with the following settings:
|
81
87
|
|
82
88
|
Rails.application.config.auther_settings = {
|
83
|
-
secret: "
|
89
|
+
secret: ENV["AUTHER_SECRET"],
|
84
90
|
accounts: [
|
85
91
|
name: "admin",
|
86
|
-
encrypted_login: "
|
87
|
-
encrypted_password: "
|
92
|
+
encrypted_login: ENV["AUTHER_ADMIN_LOGIN"],
|
93
|
+
encrypted_password: ENV["AUTHER_ADMIN_PASSWORD"],
|
88
94
|
paths: ["/admin"]
|
89
95
|
]
|
90
96
|
}
|
91
97
|
|
92
|
-
**IMPORTANT**: The encrypted login
|
93
|
-
To encrypt/decrypt account credentials, launch a rails console and run the following:
|
98
|
+
**IMPORTANT**: The encrypted secret, login, and password credentials used in the `.env` setup above must be re-encrypted
|
99
|
+
before deploying to production! To encrypt/decrypt account credentials, launch a rails console and run the following:
|
94
100
|
|
95
101
|
# Best if more than 150 characters and gibberish to read. Must be the same as defined in auther settings.
|
96
102
|
cipher = Auther::Cipher.new "vuKrwD9XWoYuv@s99?tR(9VqryiL,KV{W7wFnejUa4QcVBP+D{2rD4JfuD(mXgA=$tNK4Pfn#NeGs3o3TZ3CqNc^Qb"
|
@@ -108,8 +114,8 @@ The initializer can be customized as follows:
|
|
108
114
|
* *secret* - Required. The secret passphrase used to encrypt/decrypt account credentials.
|
109
115
|
* *accounts* - Required. The array of accounts with different or similar access to the application.
|
110
116
|
* *name* - Required. The account name. The name that uniquely identifies each account.
|
111
|
-
* *encrypted_login* - Required. The encrypted account login.
|
112
|
-
* *encrypted_password* - Required. The encrypted account password.
|
117
|
+
* *encrypted_login* - Required. The encrypted account login.
|
118
|
+
* *encrypted_password* - Required. The encrypted account password.
|
113
119
|
* *paths* - Required. The array of blacklisted paths for which only this account has access to.
|
114
120
|
* *authorized_url* - Optional. The URL to redirect to upon successful authorization. Authorized redirection works
|
115
121
|
as follows (in the order defined):
|
data/lib/auther/version.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
Rails.application.config.auther_settings = {
|
2
|
-
secret: "
|
2
|
+
secret: ENV["AUTHER_SECRET"],
|
3
3
|
accounts: [
|
4
4
|
name: "admin",
|
5
|
-
encrypted_login: "
|
6
|
-
encrypted_password: "
|
5
|
+
encrypted_login: ENV["AUTHER_ADMIN_LOGIN"],
|
6
|
+
encrypted_password: ENV["AUTHER_ADMIN_PASSWORD"],
|
7
7
|
paths: ["/admin"]
|
8
8
|
]
|
9
9
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auther
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
fMlZDUGx3lQarp/vPjK+6XH7DLXjBEKqeIGBIpLthYUvDxJRp23C+T3liGSL32vg
|
31
31
|
mSpxxwmK95GDFuEy2mNPaxnazdkw8c+7DbrSpzd/CnNZkRgitxOavs8=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2014-07-
|
33
|
+
date: 2014-07-18 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: pry-byebug
|
metadata.gz.sig
CHANGED
Binary file
|