auther 2.2.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a723b61c8ea5e2e91454740901106c8ec8848c99
4
- data.tar.gz: 51ab5d8928d887e9b57c4c9c3e4855b279a6113a
3
+ metadata.gz: a66114fa344f0e0ce5003e241ee5a157b4e4abf1
4
+ data.tar.gz: 5689ed9bba3ed4dde0d4c084b64dcf4f8757e831
5
5
  SHA512:
6
- metadata.gz: 41ed68e6d661e6e782d08b55b1c82110a40774f86b5b5005dbb1cc678cfa5af42a78d5919784ffdec84187a94f98d0843bae53711468efa03db1672ebc5a0f9f
7
- data.tar.gz: 8dcaf09300d02c88e27872912c56e7dd14a06b18fbe1423fc10a3ffa3024f11098e1ecf0396b93d81ab4c6354c7c254ad436655aee8460ec88604b7448b7f6eb
6
+ metadata.gz: e0a3ac57b79d582af11f16b5678675c028194179c5b311f5e539061fe5c9b2eff73d9fbdcba186fcb6f7e321de46da93c42d21888abeaca4372f79c06dbf3440
7
+ data.tar.gz: fdf67d939a5225fb5841250014c22b6c3fc2754eede0b0727195699ba55e5fe5f03db03cf11441936b9653be616b0fd744df88ae4a2cf5b971a7e234ca601ede
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
- Launch your Rails application and visit either of the following routes:
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 the following credentials to login:
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: "vuKrwD9XWoYuv@s99?tR(9VqryiL,KV{W7wFnejUa4QcVBP+D{2rD4JfuD(mXgA=$tNK4Pfn#NeGs3o3TZ3CqNc^Qb",
89
+ secret: ENV["AUTHER_SECRET"],
84
90
  accounts: [
85
91
  name: "admin",
86
- encrypted_login: "N3JzR213WlBISDZsMjJQNkRXbEVmYVczbVdnMHRYVHRud29lOWRCekp6ST0tLWpFMkROekUvWDBkOHZ4ZngxZHV6clE9PQ==--cd863c39991fa4bb9a35de918aa16da54514e331",
87
- encrypted_password: "cHhFSStjRm9KbEYwK3ZJVlF2MmpTTWVVZU5acEdlejZsZEhjWFJoQWxKND0tLTE3cmpXZVBQdW5VUW1jK0ZSSDdLUnc9PQ==--f51171174fa77055540420f205e0dd9d499cfeb6",
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/password credentials must be changed and re-encrypted before deploying to production!
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. For example, the above decrypts to: *test@test.com*.
112
- * *encrypted_password* - Required. The encrypted account password. For example, the above decrypts to: *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):
@@ -1,3 +1,3 @@
1
1
  module Auther
2
- VERSION = "2.2.0"
2
+ VERSION = "3.0.0"
3
3
  end
@@ -1,9 +1,9 @@
1
1
  Rails.application.config.auther_settings = {
2
- secret: "vuKrwD9XWoYuv@s99?tR(9VqryiL,KV{W7wFnejUa4QcVBP+D{2rD4JfuD(mXgA=$tNK4Pfn#NeGs3o3TZ3CqNc^Qb",
2
+ secret: ENV["AUTHER_SECRET"],
3
3
  accounts: [
4
4
  name: "admin",
5
- encrypted_login: "N3JzR213WlBISDZsMjJQNkRXbEVmYVczbVdnMHRYVHRud29lOWRCekp6ST0tLWpFMkROekUvWDBkOHZ4ZngxZHV6clE9PQ==--cd863c39991fa4bb9a35de918aa16da54514e331",
6
- encrypted_password: "cHhFSStjRm9KbEYwK3ZJVlF2MmpTTWVVZU5acEdlejZsZEhjWFJoQWxKND0tLTE3cmpXZVBQdW5VUW1jK0ZSSDdLUnc9PQ==--f51171174fa77055540420f205e0dd9d499cfeb6",
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: 2.2.0
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-07 00:00:00.000000000 Z
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