mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-04 03:42:40 +02:00
refactor authenticate to use Token.
This commit is contained in:
parent
6b638db825
commit
58b00525cc
4 changed files with 27 additions and 38 deletions
|
@ -59,7 +59,7 @@ func (api *ApiManagerCtx) Route(r chi.Router) {
|
|||
|
||||
func (api *ApiManagerCtx) Authenticate(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
session, err := api.sessions.AuthenticateRequest(r)
|
||||
session, err := api.sessions.Authenticate(r)
|
||||
if err != nil {
|
||||
utils.HttpUnauthorized(w, err)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue