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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29cb7098164d961235da49ead51d3b78af737ffbef7f725bb8b717cfc65b9331
4
- data.tar.gz: ae7679f72682edfc40064e8f6693a5dff0aaac36b74bc0810896647852583684
3
+ metadata.gz: fbb2210bea258d8ff9c6c4cab8eded587a98f4c4beb76b14595086447582d062
4
+ data.tar.gz: 1bd6a4562924b9e148b07a8aeb0a96c8cbf755d3b2f7eb94cd2fe4f8090327b8
5
5
  SHA512:
6
- metadata.gz: 1f2f332262c78e6a77e0da0c87c8b1d66764ccf8fefcecc776e03be2d5a76c68105dcf6667e67dd1273234a810fdac9dc7e3b39552dde174c753da5efcc384cb
7
- data.tar.gz: 0cf6641c87c3605eedb0782b4e8f7a2322067ff9d1a978537e6a60cfce5e06025b49b76e45c9b64cad33e4e7fbbcc97a0955c1b624a220de22195efc61e760ca
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"12345678" >> .env
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"12345678" # Password in Heimdall
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
  ```
@@ -5,21 +5,24 @@ module HeimdallAuth
5
5
  end
6
6
 
7
7
  initializer "heimdall_auth.middleware" do |app|
8
- fail_missing_config! if [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
- }
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 fail_missing_config!
22
- raise "Heimdall configuration is missing. Set the follwing ENV-Variables: HEIMDALL_SERVER_URL, HEIMDALL_APPLICATION_ID and HEIMDALL_APPLICATION_SECRET"
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
@@ -1,3 +1,3 @@
1
1
  module HeimdallAuth
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heimdall_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - René Meye