authz icon indicating copy to clipboard operation
authz copied to clipboard

[Question] Can you please provide an example?

Open MushiTheMoshi opened this issue 2 years ago • 3 comments

Hi there,

Looks great, though I am not too sure how to implement it, is there a chance you could add a full example how to implement in a gin app?

Thanks in advance, Julio

MushiTheMoshi avatar Jul 19 '22 11:07 MushiTheMoshi

Second this, need an example use this with your gin-jwt

tomriddle1234 avatar Sep 05 '22 06:09 tomriddle1234

@JalinWang

hsluoyz avatar Sep 05 '22 14:09 hsluoyz

Hi there,

Looks great, though I am not too sure how to implement it, is there a chance you could add a full example how to implement in a gin app?

Thanks in advance, Julio

I don't get you. What do you want to know?

Second this, need an example use this with your gin-jwt

Authz works like a wrap of middleware.BasicAuth and just reads the Authorization header. You can integrate it with gin-jwt just as how you do with BasicAuth + JWT(A blog in Chinese for ref). What you need to do is replace middleware.BasicAuth(auth) with authz.NewAuthorizer(e) in README.

JalinWang avatar Sep 08 '22 12:09 JalinWang

I don't get you. What do you want to know?

@JalinWang Curse of Knowledge aye?

qrhfz avatar Oct 17 '22 12:10 qrhfz

@MushiTheMoshi @tomriddle1234 @qrhfz see: https://github.com/casbin/gin-casbin-example

hsluoyz avatar Mar 15 '23 07:03 hsluoyz