diff options
Diffstat (limited to 'lib/reclaim_oidc.rb')
-rw-r--r-- | lib/reclaim_oidc.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/reclaim_oidc.rb b/lib/reclaim_oidc.rb index fa91c05..4c06936 100644 --- a/lib/reclaim_oidc.rb +++ b/lib/reclaim_oidc.rb | |||
@@ -26,8 +26,13 @@ class ReclaimOidc | |||
26 | 26 | ||
27 | def get_client_secret | 27 | def get_client_secret |
28 | uri = URI(@url + '/config/reclaim-rest-plugin') | 28 | uri = URI(@url + '/config/reclaim-rest-plugin') |
29 | resp = JSON.parse Net::HTTP.get(uri) | 29 | begin |
30 | return resp["OIDC_CLIENT_SECRET"] | 30 | resp = JSON.parse Net::HTTP.get(uri) |
31 | return resp["OIDC_CLIENT_SECRET"] | ||
32 | rescue Errno::ECONNREFUSED => e | ||
33 | puts "ERROR: REST service is not running" | ||
34 | exit | ||
35 | end | ||
31 | end | 36 | end |
32 | 37 | ||
33 | def get_clients | 38 | def get_clients |