What this change means
How responses are judged changed. Changes how the detector verifies or what it treats as the credential.
| Field | Before | After |
|---|---|---|
| Expected statuses | Before: 200 (StatusOK, StatusUnprocessableEntity) → verified; 401 (StatusUnauthorized) → not verified; other (default) → error or unknown | After: 200 (StatusOK) → verified; 401 (StatusUnauthorized, StatusUnprocessableEntity) → not verified; other (default) → error or unknown |
| @@ -115,10 +115,9 @@ func verifyMatch(ctx context.Context, client *http.Client, id, secret string) (b | ||
| 115 | 115 | }() |
| 116 | 116 | |
| 117 | 117 | switch res.StatusCode { |
| 118 | removed: // The endpoint responds with status 200 for valid Organization credentials and 422 for Client credentials. | |
| 119 | removed: case http.StatusOK, http.StatusUnprocessableEntity: | |
| 118 | added: case http.StatusOK: | |
| 120 | 119 | return true, nil |
| 121 | removed: case http.StatusUnauthorized: | |
| 120 | added: case http.StatusUnauthorized, http.StatusUnprocessableEntity: | |
| 122 | 121 | return false, nil |
| 123 | 122 | default: |
| 124 | 123 | return false, fmt.Errorf("unexpected status code: %d", res.StatusCode) |