diff options
Diffstat (limited to 'bin/api')
| -rwxr-xr-x | bin/api | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -21,7 +21,7 @@ end lib_path = Pathname.new(__FILE__).parent.parent.join('lib').realpath.to_s $LOAD_PATH.unshift(lib_path) unless $LOAD_PATH.include?(lib_path) -require 'authx' +require 'authx/rpc' $scheme = ENV.fetch("SCHEME", "http") $port = ENV.fetch("PORT", 8284).to_i @@ -95,8 +95,6 @@ class API private def authorized?(request, permission, resource = Organization.new(id: 1)) - # TODO:: Check the JWT for the appropriate claim - # Connect to the Authz RPC endpoint Ability.allowed?(subject, permission, resource) token = request&.get_header('HTTP_AUTHORIZATION')&.split(' ', 2)&.last response = rpc.allowed( subject: token, |
