summaryrefslogtreecommitdiff
path: root/bin/api
diff options
context:
space:
mode:
Diffstat (limited to 'bin/api')
-rwxr-xr-xbin/api5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/api b/bin/api
index 212e31a..15e63b7 100755
--- a/bin/api
+++ b/bin/api
@@ -79,8 +79,8 @@ class API
def authorized?(request, permission)
# TODO:: Check the JWT for the appropriate claim
# Connect to the Authz RPC endpoint Ability.allowed?(subject, permission, resource)
- client = ::Ability::Stub.new('localhost:50051', :this_channel_is_insecure) # TODO:: memorize client
- reply = client.allowed(AllowRequest.new(subject: "", permission: permission, resource: ""))
+ client = ::Authx::Ability::Stub.new('localhost:50051', :this_channel_is_insecure) # TODO:: memorize client
+ reply = client.allowed(::Authx::AllowRequest.new(subject: "", permission: permission, resource: ""))
puts "***" * 10
puts reply.inspect
puts "***" * 10
@@ -119,6 +119,7 @@ end
if __FILE__ == $0
app = Rack::Builder.new do
+ use Rack::CommonLogger
use Rack::Reloader
run API.new
end.to_app