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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 25c9589638cd274fad2d66b2724c4b34a745fdd7a55a6e4ee8a5f6c5916651d1
4
- data.tar.gz: 17c5130e76a0806ef8ccfa7953c421e6aaae07477d961cd406489ee9389e3bc7
3
+ metadata.gz: 071bfbdcb392967adb71b8db86e80fc53e871ad773a293ee704a586ce0f19881
4
+ data.tar.gz: a6e5580df5ae4fc67dc9adf93629b5a0c960a1a27d74ccea0bd7293bdfe2db8c
5
5
  SHA512:
6
- metadata.gz: 9695034017581e371f972b34822ba3c58b3dadc29c9b04c10743b0d0bb53f4bd4b2f9ad5a183a5cabddb05488f1e21b3d1dfd6828116a363c3c56297f7dd4794
7
- data.tar.gz: dfa59680aa7726e9760f90985a79c0325971535933fc642f18d7b57acc0e4d9a65a5a1312773afbf5579e01fc6fe3417aeaa1af237d408b4c610209a7813385b
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
- attr_reader :error, :message, :state
6
-
7
- def initialize(error, error_description, state)
8
- super(error, 401, error_description)
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][:error], args[:params][:error_description],
46
- args[:params][:state])
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')
@@ -7,7 +7,7 @@ module ForestAdminAgent
7
7
  class SchemaEmitter
8
8
  LIANA_NAME = "agent-ruby"
9
9
 
10
- LIANA_VERSION = "1.0.0-beta.98"
10
+ LIANA_VERSION = "1.0.0-beta.99"
11
11
 
12
12
  def self.get_serialized_schema(datasource)
13
13
  schema_path = Facades::Container.cache(:schema_path)
@@ -1,3 +1,3 @@
1
1
  module ForestAdminAgent
2
- VERSION = "1.0.0-beta.98"
2
+ VERSION = "1.0.0-beta.99"
3
3
  end
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.98
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-25 00:00:00.000000000 Z
12
+ date: 2025-02-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport