clonk 2.1.1 → 2.2.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
  SHA256:
3
- metadata.gz: d93e0ba4010b58d01737ca036d65fe5c2e2fb2fefcb1d59f49efd90cb5a2c646
4
- data.tar.gz: ab35ba52093b55b46c10b47f0c26915b938506988414edcf1ffbaf17e28aad25
3
+ metadata.gz: 4fe9ab2c1013cc5cc0f98d366a026a8f2d119799993989b9716cb68e71e6e230
4
+ data.tar.gz: 9b24bbd75517bf041c2ff1d6caa26ffc627729d7908d51a34dc949dfc5cd4806
5
5
  SHA512:
6
- metadata.gz: 7473e0e24c47a096be7bc9504da34e2650872bcbbc0fc1916cee43ad1d35337c16f3d3be231894b4f18b43b011a28974628bcf04b9378a1c17d80ca9bc3ca7b7
7
- data.tar.gz: 275f6b6b4105b01712a4ae854168ec81471086973b834c523f8e953ac1320ed8692d299349c73d135d10bc2fdc0abe157e43f061b69e47fd3ab8c07c515c0e74
6
+ metadata.gz: 70a3ad427d92b3c95b0fdf4e7d42fabd2f1f7cd8ba962e0e966846dc3adeca1edad7d502d8102744c34d494bd01f6e77c0411643035ef2b5931f77196d2a208d
7
+ data.tar.gz: 5cccc2ffe10808c12b64f39af8991fa5cfae47a6eb38a054eeaf84347c4ac8baa70ff57529d361f2839cd7b95866a22ea80d3be6b7ed428ec2b929fa0e63bad0
data/lib/clonk.rb CHANGED
@@ -20,6 +20,14 @@ module Clonk
20
20
  faraday.headers['Authorization'] = "Bearer #{token}" if token
21
21
  end
22
22
  end
23
+
24
+ def logout_url(base_url:, realm_id:, redirect_uri:)
25
+ "#{base_url}/auth/realms/#{realm_id}/protocol/openid-connect/logout?redirect_uri=#{CGI.escape(redirect_uri)}"
26
+ end
27
+
28
+ def login_url(base_url:, realm_id:, redirect_uri:, client_id:)
29
+ "#{base_url}/auth/realms/#{realm_id}/protocol/openid-connect/auth?response_type=code&client_id=#{client_id}&redirect_uri=#{CGI.escape(redirect_uri)}"
30
+ end
23
31
  end
24
32
  end
25
33
 
@@ -166,11 +166,11 @@ module Clonk
166
166
  end
167
167
 
168
168
  def logout_url(realm_id: @realm.name, client_id: @client_id, redirect_uri:)
169
- "#{@base_url}/realms/#{realm_id}/protocol/openid-connect/logout?redirect_uri=#{CGI.escape(redirect_uri)}"
169
+ "#{@base_url}/auth/realms/#{realm_id}/protocol/openid-connect/logout?redirect_uri=#{CGI.escape(redirect_uri)}"
170
170
  end
171
171
 
172
172
  def login_url(realm_id: @realm.name, redirect_uri:, client_id: @client_id)
173
- "#{@base_url}/realms/#{realm_id}/protocol/openid-connect/auth?response_type=code&client_id=#{client_id}&redirect_uri=#{CGI.escape(redirect_uri)}"
173
+ "#{@base_url}/auth/realms/#{realm_id}/protocol/openid-connect/auth?response_type=code&client_id=#{client_id}&redirect_uri=#{CGI.escape(redirect_uri)}"
174
174
  end
175
175
  end
176
176
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clonk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Fish
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-14 00:00:00.000000000 Z
11
+ date: 2018-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday