Skip to content

apache/casbin-node-casbin-graphql-authz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

graphql-authz

Coverage Status Go Release Go Report Card

graphql-authz is a casbin binding of graphql, something like restful api. There're actions, like enforce, getPolicies, addPolicy, removePolicy, updatePolicy.

Install

go get -u github.com/casbin/graphql-authz

Usage

Enforce Example:

e, _ := casbin.NewEnforcer("./examples/model.conf", "./examples/policy.csv")
schema := authz.InitType(e)
result := authz.Execute(`{enforce(sub:"alice" obj:"data1" act:"read"){sub obj act ok}}`, schema)

More info, please refer to graphql and basic usage

About

graphql-authz is an authorization middleware for graphql-go

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages