Closed tnclong closed 7 years ago
Hi @bodhi @jinzhu
Can you share your thought here?
https://github.com/qor/auth/blob/master/authority/authority.go#L33
https://github.com/qor/auth/blob/master/authority/authority.go#L81
After valid the roles, I want write proto(json) message to front-end instead of redirect to login page. I think the how to handle access deny is a configurable behavior.
// Config authority config type Config struct { Auth AuthInterface Role *roles.Role // RedirectPathAfterAccessDenied string AccessDenyHandler func(w http.ResponseWriter, req *http.Request, auth AuthInterface) }
Thanks!
https://github.com/qor/auth/commit/47e5e51db6ccc9a89a9ac67942ed7d63f6229560
Hi @bodhi @jinzhu
Can you share your thought here?
https://github.com/qor/auth/blob/master/authority/authority.go#L33
https://github.com/qor/auth/blob/master/authority/authority.go#L81
After valid the roles, I want write proto(json) message to front-end instead of redirect to login page. I think the how to handle access deny is a configurable behavior.