Skip to content

Commit

Permalink
add log
Browse files Browse the repository at this point in the history
  • Loading branch information
Xunop committed Oct 25, 2023
1 parent 408ab07 commit fbfc1b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/v1/oauth_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ func userAuthorizeHandler(w http.ResponseWriter, r *http.Request) (userID string

w.Header().Set("Content-Type", "application/json")
response := result.Failed(result.TokenError)
log.Println("Oauth2: token is empty")
json, _ := json.Marshal(response)
w.Write(json)
return
Expand All @@ -302,6 +303,7 @@ func userAuthorizeHandler(w http.ResponseWriter, r *http.Request) (userID string

w.Header().Set("Content-Type", "application/json")
response := result.Failed(result.TokenError)
log.Println("Oauth2: token is invalid")
json, _ := json.Marshal(response)
w.Write(json)
return
Expand All @@ -318,6 +320,7 @@ func userAuthorizeHandler(w http.ResponseWriter, r *http.Request) (userID string

w.Header().Set("Content-Type", "application/json")
response := result.Failed(result.TokenError)
log.Println("Oauth2: token is invalid")
json, _ := json.Marshal(response)
w.Write(json)
return
Expand All @@ -332,6 +335,7 @@ func userAuthorizeHandler(w http.ResponseWriter, r *http.Request) (userID string

w.Header().Set("Content-Type", "application/json")
response := result.Failed(result.TokenError)
log.Println("Oauth2: token is invalid")
json, _ := json.Marshal(response)
w.Write(json)
return
Expand Down

0 comments on commit fbfc1b7

Please sign in to comment.