All Projects → casbin → Protobuf Adapter

casbin / Protobuf Adapter

Licence: apache-2.0
Google Protocol Buffers adapter for Casbin

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Protobuf Adapter

Gorm Adapter
Gorm adapter for Casbin
Stars: ✭ 373 (+101.62%)
Mutual labels:  adapter, authorization, access-control, casbin
sequelize-adapter
Sequelize adapter for Casbin
Stars: ✭ 51 (-72.43%)
Mutual labels:  adapter, authorization, access-control, casbin
Mongodb Adapter
MongoDB adapter for Casbin
Stars: ✭ 194 (+4.86%)
Mutual labels:  adapter, authorization, access-control, casbin
Xorm Adapter
Xorm adapter for Casbin
Stars: ✭ 329 (+77.84%)
Mutual labels:  adapter, authorization, access-control, casbin
Redis Adapter
Redis adapter for Casbin
Stars: ✭ 167 (-9.73%)
Mutual labels:  adapter, authorization, access-control, casbin
Jcasbin
An authorization library that supports access control models like ACL, RBAC, ABAC in Java
Stars: ✭ 1,335 (+621.62%)
Mutual labels:  authorization, access-control, casbin
Casbin Cpp
An authorization library that supports access control models like ACL, RBAC, ABAC in C/C++
Stars: ✭ 113 (-38.92%)
Mutual labels:  authorization, access-control, casbin
Node Casbin
An authorization library that supports access control models like ACL, RBAC, ABAC in Node.js and Browser
Stars: ✭ 1,757 (+849.73%)
Mutual labels:  authorization, access-control, casbin
Casbin Rs
An authorization library that supports access control models like ACL, RBAC, ABAC in Rust.
Stars: ✭ 375 (+102.7%)
Mutual labels:  authorization, access-control, casbin
Laravel Authz
An authorization library that supports access control models like ACL, RBAC, ABAC in Laravel.
Stars: ✭ 136 (-26.49%)
Mutual labels:  authorization, access-control, casbin
Casbin.net
An authorization library that supports access control models like ACL, RBAC, ABAC in .NET (C#)
Stars: ✭ 535 (+189.19%)
Mutual labels:  authorization, access-control, casbin
Casbin
An authorization library that supports access control models like ACL, RBAC, ABAC in Golang
Stars: ✭ 10,872 (+5776.76%)
Mutual labels:  authorization, access-control, casbin
Negroni Authz
negroni-authz is an authorization middleware for Negroni
Stars: ✭ 152 (-17.84%)
Mutual labels:  authorization, access-control, casbin
Casbin Server
Casbin as a Service (CaaS)
Stars: ✭ 171 (-7.57%)
Mutual labels:  authorization, access-control, casbin
Openstack Policy Editor
A Casbin Policy Editor for OpenStack
Stars: ✭ 28 (-84.86%)
Mutual labels:  authorization, access-control, casbin
Think Authz
An authorization library that supports access control models like ACL, RBAC, ABAC in ThinkPHP 6.0 .
Stars: ✭ 155 (-16.22%)
Mutual labels:  authorization, access-control, casbin
jdbc-adapter
JDBC adapter for Casbin
Stars: ✭ 26 (-85.95%)
Mutual labels:  adapter, authorization, access-control
casbin-ex
An authorization library that supports access control models like ACL, RBAC, ABAC in Elixir
Stars: ✭ 37 (-80%)
Mutual labels:  authorization, access-control, casbin
Casbin4D
An authorization library that supports access control models like ACL, RBAC, ABAC in Delphi
Stars: ✭ 25 (-86.49%)
Mutual labels:  authorization, access-control, casbin
Pycasbin
An authorization library that supports access control models like ACL, RBAC, ABAC in Python
Stars: ✭ 625 (+237.84%)
Mutual labels:  authorization, access-control, casbin

Protobuf Adapter Build Status Coverage Status Godoc

Protobuf Adapter is the Google Protocol Buffers adapter for Casbin. With this library, Casbin can load policy from Protocol Buffers or save policy to it.

Installation

go get github.com/casbin/protobuf-adapter

Simple Example

package main

import (
	"github.com/casbin/casbin"
	"github.com/casbin/protobuf-adapter"
)

func main() {
	// Initialize a Protobuf adapter and use it in a Casbin enforcer:
	b := []byte{} // b stores Casbin policy in Protocol Buffers.
	a := protobufadapter.NewProtobufAdapter(&b) // Use b as the data source. 
	e := casbin.NewEnforcer("examples/rbac_model.conf", a)
	
	// Load the policy from Protocol Buffers bytes b.
	e.LoadPolicy()
	
	// Check the permission.
	e.Enforce("alice", "data1", "read")
	
	// Modify the policy.
	// e.AddPolicy(...)
	// e.RemovePolicy(...)
	
	// Save the policy back to Protocol Buffers bytes b.
	e.SavePolicy()
}

Getting Help

License

This project is under Apache 2.0 License. See the LICENSE file for the full license text.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].