forest_admin_agent 1.0.0.pre.beta.98 → 1.0.0.pre.beta.99
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/lib/forest_admin_agent/auth/oauth2/forest_provider.rb +3 -0
- data/lib/forest_admin_agent/http/Exceptions/authentication_open_id_client.rb +4 -7
- data/lib/forest_admin_agent/routes/security/authentication.rb +3 -2
- data/lib/forest_admin_agent/utils/schema/schema_emitter.rb +1 -1
- data/lib/forest_admin_agent/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 071bfbdcb392967adb71b8db86e80fc53e871ad773a293ee704a586ce0f19881
|
4
|
+
data.tar.gz: a6e5580df5ae4fc67dc9adf93629b5a0c960a1a27d74ccea0bd7293bdfe2db8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86e0d403f2690a1796f9691ce799543829be6a4c168948253ac8fe6cf18417d0501b493559bf2ef1bd07b64ac8d13a9131032e093b237c979dc9595d84dfbd24
|
7
|
+
data.tar.gz: cf9c649e95da03edca9db6d6b7518ccf0627fcb26eb9dfb9da8960979ee69c97149deb7c06e7721e6c63ef2d557503e64d9fd607532298b439f03929a380010c
|
@@ -47,6 +47,9 @@ module ForestAdminAgent
|
|
47
47
|
raise OpenIDConnect::BadRequest.new('API Access Failed', response)
|
48
48
|
when 401
|
49
49
|
raise OpenIDConnect::Unauthorized.new(Utils::ErrorMessages::AUTHORIZATION_FAILED, response)
|
50
|
+
when 403
|
51
|
+
error = response.body['errors'].first
|
52
|
+
raise OpenIDConnect::Forbidden.new(error['name'], error['detail'])
|
50
53
|
when 404
|
51
54
|
raise OpenIDConnect::HttpError.new(response.status, Utils::ErrorMessages::SECRET_NOT_FOUND, response)
|
52
55
|
when 422
|
@@ -2,13 +2,10 @@ module ForestAdminAgent
|
|
2
2
|
module Http
|
3
3
|
module Exceptions
|
4
4
|
class AuthenticationOpenIdClient < HttpException
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
super
|
9
|
-
@error = error
|
10
|
-
@message = error_description
|
11
|
-
@state = state
|
5
|
+
def initialize(status = 401,
|
6
|
+
message = 'Authentication failed with OpenID Client',
|
7
|
+
name = 'AuthenticationOpenIdClient')
|
8
|
+
super
|
12
9
|
end
|
13
10
|
end
|
14
11
|
end
|
@@ -42,8 +42,9 @@ module ForestAdminAgent
|
|
42
42
|
|
43
43
|
def handle_authentication_callback(args = {})
|
44
44
|
if args[:params].key?(:error)
|
45
|
-
raise AuthenticationOpenIdClient.new(args[:params][:
|
46
|
-
args[:params][:
|
45
|
+
raise AuthenticationOpenIdClient.new(args[:params][:state],
|
46
|
+
args[:params][:error],
|
47
|
+
args[:params][:error_description])
|
47
48
|
end
|
48
49
|
|
49
50
|
if args.dig(:headers, 'action_dispatch.remote_ip')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forest_admin_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.pre.beta.
|
4
|
+
version: 1.0.0.pre.beta.99
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthieu
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-02-
|
12
|
+
date: 2025-02-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|