Sha256: e84a692f9c3e7ec5bb539ab634a5fe56323e5298f8a0efbb43d90d8e0b785bf2
Contents?: true
Size: 1.93 KB
Versions: 7
Compression:
Stored size: 1.93 KB
Contents
# Aserto::Authorizer [![Gem Version](https://badge.fury.io/rb/aserto-authorizer.svg)](https://badge.fury.io/rb/aserto-authorizer) [![ci](https://github.com/aserto-dev/ruby-authorizer/actions/workflows/ci.yaml/badge.svg)](https://github.com/aserto-dev/ruby-authorizer/actions/workflows/ci.yaml) [![slack](https://img.shields.io/badge/slack-Aserto%20Community-brightgreen)](https://asertocommunity.slack.com ) Ruby generated GRPC client for Aserto Authorizer ## Installation Add this line to your application's Gemfile: ```ruby gem 'aserto-authorizer' ``` And then execute: $ bundle install Or install it yourself as: $ gem install aserto-authorizer ## Usage ```ruby require 'aserto/authorizer' query_request = Aserto::Authorizer::V2::QueryRequest.new( { query: 'x=data', policy_instance: Aserto::Authorizer::V2::Api::PolicyInstance.new( { name: 'my-policy' } ) } ) client = Aserto::Authorizer::V2::Authorizer::Stub.new( "authorizer.eng.aserto.com:8443", GRPC::Core::ChannelCredentials.new ) begin resp = client.query( query_request, { metadata: { "authorization": 'my-bearer-token', } } ) # use response puts resp.inspect rescue GRPC::BadStatus => e # handle error puts e.inspect end ``` ## Development Prerequisites: - go >= 1.17 to generate Ruby code - Ruby >= 2.7.0 to run the code After checking out the repo, run `mage generate` to generate Ruby code. Run `bundle install` to install dependencies. Then, run `bundle exec rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/aserto-dev/ruby-authorizer. This project is intended to be a safe, welcoming space for collaboration. ## License The gem is available as open source under the terms of the [Apache-2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
Version data entries
7 entries across 7 versions & 1 rubygems