mirror of
https://github.com/1f349/lavender.git
synced 2024-12-22 07:34:06 +00:00
Add extra logging for oauth HandleAuthorizeRequest
This commit is contained in:
parent
8d489825d7
commit
d9d1a5e452
@ -1,6 +1,7 @@
|
|||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/1f349/lavender/logger"
|
||||||
"github.com/1f349/lavender/pages"
|
"github.com/1f349/lavender/pages"
|
||||||
"github.com/1f349/lavender/scope"
|
"github.com/1f349/lavender/scope"
|
||||||
"github.com/julienschmidt/httprouter"
|
"github.com/julienschmidt/httprouter"
|
||||||
@ -110,6 +111,7 @@ func (h *HttpServer) authorizeEndpoint(rw http.ResponseWriter, req *http.Request
|
|||||||
// redirect with an error if the action is not authorize
|
// redirect with an error if the action is not authorize
|
||||||
if form.Get("oauth_action") == "authorize" || isSSO {
|
if form.Get("oauth_action") == "authorize" || isSSO {
|
||||||
if err := h.oauthSrv.HandleAuthorizeRequest(rw, req); err != nil {
|
if err := h.oauthSrv.HandleAuthorizeRequest(rw, req); err != nil {
|
||||||
|
logger.Logger.Error(err)
|
||||||
http.Error(rw, err.Error(), http.StatusBadRequest)
|
http.Error(rw, err.Error(), http.StatusBadRequest)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
4
test-client/run2.sh
Executable file
4
test-client/run2.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
cd "$(dirname -- "$(readlink -f -- "$0";)";)"
|
||||||
|
|
||||||
|
python3 -m http.server 2021
|
Loading…
Reference in New Issue
Block a user