casdoor / casdoor-python-sdk

Python client SDK for Casdoor
https://pypi.org/project/casdoor
Apache License 2.0
34 stars 36 forks source link

fastapi oauth guide #41

Closed mr-m0nst3r closed 1 year ago

mr-m0nst3r commented 1 year ago

Hi there.

I'm using fastapi, it's pretty good, and I can easily manage the role based auth using Depends method from fastapi.

In the casdoor-python-vue-sdk-example, it's flask using sessions as a way for auth. Didn't find any useful info for fastapi devs.

I'm not a pro programmer, so I'm learning and coding, can't find any guides for fastapi and cardoor sdk examples yet, any guidance so I can use fastapi oauth as easy as this demo: https://fastapi.tiangolo.com/tutorial/security/oauth2-jwt/

much appreciated.

casbin-bot commented 1 year ago

@seriouszyx @ComradeProgrammer @Resulte

mr-m0nst3r commented 1 year ago

Update:

I found this issue from fastapi very promissing: https://github.com/tiangolo/fastapi/issues/12, may be of some help.