@@ -729,15 +729,9 @@ Y_UNIT_TEST_SUITE(Mvp) {
729729
730730 TAutoPtr<IEventHandle> handle;
731731 NHttp::TEvHttpProxy::TEvHttpOutgoingResponse* outgoingResponseEv = runtime.GrabEdgeEvent <NHttp::TEvHttpProxy::TEvHttpOutgoingResponse>(handle);
732- UNIT_ASSERT_STRINGS_EQUAL (outgoingResponseEv->Response ->Status , " 302" );
733- const NHttp::THeaders headers (outgoingResponseEv->Response ->Headers );
734- UNIT_ASSERT (headers.Has (" Location" ));
735- TString location = TString (headers.Get (" Location" ));
736- UNIT_ASSERT_STRING_CONTAINS (location, " https://auth.test.net/oauth/authorize" );
737- UNIT_ASSERT_STRING_CONTAINS (location, " response_type=code" );
738- UNIT_ASSERT_STRING_CONTAINS (location, " scope=openid" );
739- UNIT_ASSERT_STRING_CONTAINS (location, " client_id=" + settings.ClientId );
740- UNIT_ASSERT_STRING_CONTAINS (location, " redirect_uri=https://" + hostProxy + " /auth/callback" );
732+ UNIT_ASSERT_STRINGS_EQUAL (outgoingResponseEv->Response ->Status , " 400" );
733+ UNIT_ASSERT_STRING_CONTAINS (outgoingResponseEv->Response ->Body , " Unknown error has occurred. Please open the page again" );
734+
741735 }
742736
743737 Y_UNIT_TEST (OpenIdConnectotWrongStateAuthorizationFlow) {
@@ -846,22 +840,11 @@ Y_UNIT_TEST_SUITE(Mvp) {
846840 " Content-Length: " + ToString (authorizationServerResponse.length ()) + " \r\n\r\n " + authorizationServerResponse);
847841 runtime.Send (new IEventHandle (handle->Sender , edge, new NHttp::TEvHttpProxy::TEvHttpIncomingResponse (outgoingRequestEv->Request , incomingResponse)));
848842 auto outgoingResponseEv = runtime.GrabEdgeEvent <NHttp::TEvHttpProxy::TEvHttpOutgoingResponse>(handle);
849- redirectStrategy.CheckRedirectStatus (outgoingResponseEv);
850- TString location = redirectStrategy.GetRedirectUrl (outgoingResponseEv);
851- UNIT_ASSERT_STRING_CONTAINS (location, " https://auth.test.net/oauth/authorize" );
852- UNIT_ASSERT_STRING_CONTAINS (location, " response_type=code" );
853- UNIT_ASSERT_STRING_CONTAINS (location, " scope=openid" );
854- UNIT_ASSERT_STRING_CONTAINS (location, " client_id=" + settings.ClientId );
855- UNIT_ASSERT_STRING_CONTAINS (location, " redirect_uri=https://oidcproxy.net/auth/callback" );
856-
857- NHttp::TUrlParameters urlParameters (location);
858- const TString newState = urlParameters[" state" ];
859-
860- NHttp::THeaders headers (outgoingResponseEv->Response ->Headers );
861- UNIT_ASSERT (headers.Has (" Set-Cookie" ));
862- const TStringBuf setCookie = headers.Get (" Set-Cookie" );
863- UNIT_ASSERT_STRING_CONTAINS (setCookie, CreateNameYdbOidcCookie (settings.ClientSecret , newState));
864- redirectStrategy.CheckSpecificHeaders (headers);
843+ UNIT_ASSERT_STRINGS_EQUAL (outgoingResponseEv->Response ->Status , " 302" );
844+ const NHttp::THeaders headers (outgoingResponseEv->Response ->Headers );
845+ UNIT_ASSERT (headers.Has (" Location" ));
846+ TStringBuf location = headers.Get (" Location" );
847+ UNIT_ASSERT_STRING_CONTAINS (location, " /requested/page" );
865848 }
866849
867850 Y_UNIT_TEST (OpenIdConnectSessionServiceCreateAccessTokenInvalid) {
0 commit comments