mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 17:48:07 +00:00
saml post
This commit is contained in:
@@ -215,11 +215,24 @@ export async function GET(request: NextRequest) {
|
|||||||
new URLSearchParams(params),
|
new URLSearchParams(params),
|
||||||
},
|
},
|
||||||
}).then((resp) => {
|
}).then((resp) => {
|
||||||
if (
|
if (resp.nextStep.case === "authUrl" && resp.nextStep.value) {
|
||||||
resp.nextStep.value &&
|
|
||||||
typeof resp.nextStep.value === "string"
|
|
||||||
) {
|
|
||||||
return NextResponse.redirect(resp.nextStep.value);
|
return NextResponse.redirect(resp.nextStep.value);
|
||||||
|
} else if (
|
||||||
|
resp.nextStep.case === "postForm" &&
|
||||||
|
resp.nextStep.value
|
||||||
|
) {
|
||||||
|
const postCall = resp.nextStep.value;
|
||||||
|
|
||||||
|
const redirectUrl = constructUrl(request, "/saml-post");
|
||||||
|
|
||||||
|
redirectUrl.searchParams.set("url", url);
|
||||||
|
redirectUrl.searchParams.set("RelayState", postCall.relayState);
|
||||||
|
redirectUrl.searchParams.set(
|
||||||
|
"SAMLResponse",
|
||||||
|
postCall.samlResponse,
|
||||||
|
);
|
||||||
|
|
||||||
|
return NextResponse.redirect(redirectUrl.toString());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -962,7 +962,6 @@ export async function startIdentityProviderFlow({
|
|||||||
urls,
|
urls,
|
||||||
}: {
|
}: {
|
||||||
serviceUrl: string;
|
serviceUrl: string;
|
||||||
|
|
||||||
idpId: string;
|
idpId: string;
|
||||||
urls: RedirectURLsJson;
|
urls: RedirectURLsJson;
|
||||||
}) {
|
}) {
|
||||||
|
Reference in New Issue
Block a user