bitly / oauth2_proxy

A reverse proxy that provides authentication with Google, Github or other provider
MIT License
5.1k stars 1.21k forks source link

How to support third-party authorization middleware in oauth2 proxy? #612

Open hsluoyz opened 6 years ago

hsluoyz commented 6 years ago

oauth2 proxy is a web framework which provides OAuth authentication. Is there any way to make it support authorization too? For example via a HTTP plugin? As I know, a lot of web frameworks there (like Beego, Caddy, Gin, Revel) support middleware or plugin.

I ask this because one of my clients wants to secure certain pages via oauth2 proxy: https://github.com/casbin/casbin/issues/103. So is there any recommended way to add something like a HTTP request filter for oauth2 proxy, so I can implement a custom authorization middleware for oauth2 proxy? Thanks.

hsluoyz commented 5 years ago

@jehiah @mbland any response?