summaryrefslogtreecommitdiff
path: root/bin/api
diff options
context:
space:
mode:
Diffstat (limited to 'bin/api')
-rwxr-xr-xbin/api4
1 files changed, 1 insertions, 3 deletions
diff --git a/bin/api b/bin/api
index 0650020..3d618a2 100755
--- a/bin/api
+++ b/bin/api
@@ -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,