heimdall_auth 1.0.0 → 1.0.1
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
- data/README.md +2 -2
- data/lib/heimdall_auth/engine.rb +13 -10
- data/lib/heimdall_auth/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbb2210bea258d8ff9c6c4cab8eded587a98f4c4beb76b14595086447582d062
|
4
|
+
data.tar.gz: 1bd6a4562924b9e148b07a8aeb0a96c8cbf755d3b2f7eb94cd2fe4f8090327b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85d7c185ece4d57035f6594cb5d91e2f9f7481b84ec33b6d991574afd81d47a88451587b6ff9e02855cb9a9ada044637202cc4936c20d70120afdb2e87baf28b
|
7
|
+
data.tar.gz: 0b5c27b48fa804a67f5742067b78c45691a5a75e4d52c436706f0d037b6d8277be3a4d406c2453bf0ed0032702157a5645d8355420f20425484cf447664de514
|
data/README.md
CHANGED
@@ -57,12 +57,12 @@ This adds a default .env.example file (for documentation purposes) to the applic
|
|
57
57
|
The following command Registeres the service at Heimdall and puts credentials at the end of the `.env` file
|
58
58
|
|
59
59
|
```bash
|
60
|
-
rails heimdall:register -- -u"rene@vesputi.com" -p"
|
60
|
+
rails heimdall:register -- -u"rene@vesputi.com" -p"YourHeimdallPassword" >> .env
|
61
61
|
```
|
62
62
|
Parameters:
|
63
63
|
```
|
64
64
|
-u"rene@vesputi.com" # Username in Heimdall (Needs Admin rights)
|
65
|
-
-p"
|
65
|
+
-p"YourHeimdallPassword" # Password in Heimdall
|
66
66
|
-h"https://heimdall.vesp" (Optional) - Protocol and Domain the heimdall is found at
|
67
67
|
-s"https://foo.vesputi-abc.de" # (Optional) - Protocol and Domain the Service is found at
|
68
68
|
```
|
data/lib/heimdall_auth/engine.rb
CHANGED
@@ -5,21 +5,24 @@ module HeimdallAuth
|
|
5
5
|
end
|
6
6
|
|
7
7
|
initializer "heimdall_auth.middleware" do |app|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
8
|
+
unless [ENV['HEIMDALL_SERVER_URL'], ENV['HEIMDALL_APPLICATION_ID'], ENV['HEIMDALL_APPLICATION_SECRET']].any? &:nil?
|
9
|
+
app.config.middleware.use OmniAuth::Builder do
|
10
|
+
provider :heimdall,
|
11
|
+
ENV['HEIMDALL_APPLICATION_ID'],
|
12
|
+
ENV['HEIMDALL_APPLICATION_SECRET'],
|
13
|
+
client_options: {
|
14
|
+
site: ENV['HEIMDALL_SERVER_URL']
|
15
|
+
}
|
16
|
+
end
|
17
|
+
else
|
18
|
+
warn_missing_config
|
16
19
|
end
|
17
20
|
end
|
18
21
|
|
19
22
|
private
|
20
23
|
|
21
|
-
def
|
22
|
-
|
24
|
+
def warn_missing_config
|
25
|
+
puts "Heimdall configuration is missing. Set the follwing ENV-Variables: HEIMDALL_SERVER_URL, HEIMDALL_APPLICATION_ID and HEIMDALL_APPLICATION_SECRET. You might execute `rails heimdall:register -- -u'rene@vesputi.com' -p'YourHeimdallPassword' >> .env`"
|
23
26
|
end
|
24
27
|
end
|
25
28
|
end
|