@@ -348,7 +348,7 @@ func Callback(w http.ResponseWriter, r *http.Request) {
348348 http .Error (w, err .Error (), http .StatusInternalServerError )
349349 return
350350 }
351- authResponse , err : = verifier .FullVerify (
351+ _ , err = verifier .FullVerify (
352352 r .Context (),
353353 string (tokenBytes),
354354 authRequest.(protocol .AuthorizationRequestMessage ),
@@ -359,17 +359,7 @@ func Callback(w http.ResponseWriter, r *http.Request) {
359359 return
360360 }
361361
362- // marshal auth resp
363- messageBytes, err := json .Marshal (authResponse)
364- if err != nil {
365- log .Println (err .Error ())
366- http .Error (w, err .Error (), http .StatusInternalServerError )
367- return
368- }
369-
370362 w .WriteHeader (http .StatusOK )
371- w .Header ().Set (" Content-Type" , " application/json" )
372- w .Write (messageBytes)
373363 log .Println (" verification passed" )
374364}
375365` ` `
@@ -415,11 +405,11 @@ async function callback(req, res) {
415405 const opts = {
416406 AcceptedStateTransitionDelay: 5 * 60 * 1000 , // 5 minute
417407 };
418- authResponse = await verifier .fullVerify (tokenStr, authRequest, opts);
408+ await verifier .fullVerify (tokenStr, authRequest, opts);
419409 } catch (error) {
420410 return res .status (500 ).send (error);
421411 }
422- return res .status (200 ). set ( " Content-Type " , " application/json " ). send (authResponse) ;
412+ return res .status (200 );
423413}
424414` ` `
425415
0 commit comments