(w http.ResponseWriter, r *http.Request)
| 2990 | } |
| 2991 | r.Body = http.MaxBytesReader(w, r.Body, 32<<10) |
| 2992 | if err := json.NewDecoder(r.Body).Decode(&req); err != nil { |
| 2993 | w.WriteHeader(http.StatusBadRequest) |
| 2994 | json.NewEncoder(w).Encode(map[string]string{"error": "Invalid JSON"}) |
| 2995 | return |
| 2996 | } |
| 2997 | if strings.TrimSpace(req.SessionID) == "" || strings.TrimSpace(req.CallbackURL) == "" { |
| 2998 | w.WriteHeader(http.StatusBadRequest) |
| 2999 | json.NewEncoder(w).Encode(map[string]string{"error": "sessionId and callbackUrl are required"}) |
| 3000 | return |
| 3001 | } |
| 3002 | |
| 3003 | progress, err := auth.ContinueMicrosoftSSOLogin(req.SessionID, req.CallbackURL) |
| 3004 | if err != nil { |
| 3005 | w.WriteHeader(http.StatusBadRequest) |
| 3006 | json.NewEncoder(w).Encode(map[string]string{"error": err.Error()}) |
| 3007 | return |
no test coverage detected