mirror of
https://github.com/netbirdio/dex.git
synced 2026-05-22 18:43:53 -07:00
Merge pull request #4204 from rackerlabs/fix-device-code-response
fix: device code pending HTTP response
This commit is contained in:
@@ -255,7 +255,7 @@ func (s *Server) handleDeviceToken(w http.ResponseWriter, r *http.Request) {
|
||||
if slowDown {
|
||||
s.tokenErrHelper(w, deviceTokenSlowDown, "", http.StatusBadRequest)
|
||||
} else {
|
||||
s.tokenErrHelper(w, deviceTokenPending, "", http.StatusUnauthorized)
|
||||
s.tokenErrHelper(w, deviceTokenPending, "", http.StatusBadRequest)
|
||||
}
|
||||
case deviceTokenComplete:
|
||||
codeChallengeFromStorage := deviceToken.PKCE.CodeChallenge
|
||||
|
||||
@@ -467,7 +467,7 @@ func TestDeviceTokenResponse(t *testing.T) {
|
||||
},
|
||||
testDeviceCode: "f00bar",
|
||||
expectedServerResponse: deviceTokenPending,
|
||||
expectedResponseCode: http.StatusUnauthorized,
|
||||
expectedResponseCode: http.StatusBadRequest,
|
||||
},
|
||||
{
|
||||
testName: "Invalid Grant Type",
|
||||
|
||||
Reference in New Issue
Block a user