Skip to content

Commit

Permalink
restore missed code due to rebase
Browse files Browse the repository at this point in the history
Signed-off-by: Houssem Ben Mabrouk <[email protected]>
  • Loading branch information
orange-hbenmabrouk committed Oct 23, 2023
1 parent 32b9ec0 commit b569806
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions server/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -829,8 +829,12 @@ func (s *Server) handleToken(w http.ResponseWriter, r *http.Request) {
return
}


grantType := r.PostFormValue("grant_type")
if !contains(s.supportedGrantTypes, grantType) {
s.logger.Errorf("unsupported grant type: %v", grantType)
s.tokenErrHelper(w, errUnsupportedGrantType, "", http.StatusBadRequest)
return
}
switch grantType {
case grantTypeDeviceCode:
s.handleDeviceToken(w, r)
Expand Down Expand Up @@ -1147,7 +1151,7 @@ func (s *Server) handlePasswordGrant(w http.ResponseWriter, r *http.Request, cli

// Get the connector
connID := q.Get("connector_id")
if connID == "" && s.defaultPasswordConnector != "" {
if connID == "" && s.defaultPasswordConnector != "" {
connID = s.defaultPasswordConnector
}

Expand Down

0 comments on commit b569806

Please sign in to comment.