Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(OSP): added auth url field in IDP config creation #1280

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ npm/npmjs/-/resolve/1.22.8, MIT AND ISC, approved, #15315
npm/npmjs/-/resolve/2.0.0-next.5, MIT AND ISC, approved, #3078
npm/npmjs/-/reusify/1.0.4, MIT, approved, clearlydefined
npm/npmjs/-/rimraf/3.0.2, ISC, approved, clearlydefined
npm/npmjs/-/rollup/4.24.0, MIT, approved, clearlydefined
npm/npmjs/-/rollup/4.24.0, MIT AND (ISC AND MIT), approved, #16917
npm/npmjs/-/run-parallel/1.2.0, MIT, approved, clearlydefined
npm/npmjs/-/safe-array-concat/1.1.2, MIT, approved, clearlydefined
npm/npmjs/-/safe-regex-test/1.0.3, MIT, approved, clearlydefined
Expand Down Expand Up @@ -690,22 +690,22 @@ npm/npmjs/@react-hook/latest/1.0.3, MIT, approved, clearlydefined
npm/npmjs/@reduxjs/toolkit/2.2.7, MIT AND (BSD-2-Clause AND ISC AND MIT) AND Apache-2.0, approved, #14170
npm/npmjs/@remix-run/router/1.19.2, MIT, approved, clearlydefined
npm/npmjs/@rollup/pluginutils/5.1.2, MIT, approved, #16428
npm/npmjs/@rollup/rollup-android-arm-eabi/4.24.0, MIT, approved, clearlydefined
npm/npmjs/@rollup/rollup-android-arm64/4.24.0, MIT, approved, clearlydefined
npm/npmjs/@rollup/rollup-darwin-arm64/4.24.0, MIT, approved, clearlydefined
npm/npmjs/@rollup/rollup-darwin-x64/4.24.0, MIT, approved, clearlydefined
npm/npmjs/@rollup/rollup-linux-arm-gnueabihf/4.24.0, MIT, approved, clearlydefined
npm/npmjs/@rollup/rollup-linux-arm-musleabihf/4.24.0, MIT, approved, clearlydefined
npm/npmjs/@rollup/rollup-linux-arm64-gnu/4.24.0, MIT, approved, clearlydefined
npm/npmjs/@rollup/rollup-linux-arm64-musl/4.24.0, MIT, approved, clearlydefined
npm/npmjs/@rollup/rollup-linux-powerpc64le-gnu/4.24.0, MIT, approved, clearlydefined
npm/npmjs/@rollup/rollup-linux-riscv64-gnu/4.24.0, MIT, approved, clearlydefined
npm/npmjs/@rollup/rollup-linux-s390x-gnu/4.24.0, MIT, approved, clearlydefined
npm/npmjs/@rollup/rollup-linux-x64-gnu/4.24.0, MIT, approved, clearlydefined
npm/npmjs/@rollup/rollup-linux-x64-musl/4.24.0, MIT, approved, clearlydefined
npm/npmjs/@rollup/rollup-win32-arm64-msvc/4.24.0, MIT, approved, clearlydefined
npm/npmjs/@rollup/rollup-win32-ia32-msvc/4.24.0, MIT, approved, clearlydefined
npm/npmjs/@rollup/rollup-win32-x64-msvc/4.24.0, MIT, approved, clearlydefined
npm/npmjs/@rollup/rollup-android-arm-eabi/4.24.0, MIT AND (ISC AND MIT), approved, #16904
npm/npmjs/@rollup/rollup-android-arm64/4.24.0, MIT AND (ISC AND MIT), approved, #16918
npm/npmjs/@rollup/rollup-darwin-arm64/4.24.0, MIT AND (ISC AND MIT), approved, #16908
npm/npmjs/@rollup/rollup-darwin-x64/4.24.0, MIT AND (ISC AND MIT), approved, #16901
npm/npmjs/@rollup/rollup-linux-arm-gnueabihf/4.24.0, MIT AND (ISC AND MIT), approved, #16906
npm/npmjs/@rollup/rollup-linux-arm-musleabihf/4.24.0, MIT AND (ISC AND MIT), approved, #16914
npm/npmjs/@rollup/rollup-linux-arm64-gnu/4.24.0, MIT AND (ISC AND MIT), approved, #16910
npm/npmjs/@rollup/rollup-linux-arm64-musl/4.24.0, MIT AND (ISC AND MIT), approved, #16912
npm/npmjs/@rollup/rollup-linux-powerpc64le-gnu/4.24.0, MIT AND (ISC AND MIT), approved, #16916
npm/npmjs/@rollup/rollup-linux-riscv64-gnu/4.24.0, MIT AND (ISC AND MIT), approved, #16907
npm/npmjs/@rollup/rollup-linux-s390x-gnu/4.24.0, MIT AND (ISC AND MIT), approved, #16919
npm/npmjs/@rollup/rollup-linux-x64-gnu/4.24.0, MIT AND (ISC AND MIT), approved, #16915
npm/npmjs/@rollup/rollup-linux-x64-musl/4.24.0, MIT AND (ISC AND MIT), approved, #16911
npm/npmjs/@rollup/rollup-win32-arm64-msvc/4.24.0, MIT AND (ISC AND MIT), approved, #16909
npm/npmjs/@rollup/rollup-win32-ia32-msvc/4.24.0, MIT AND (ISC AND MIT), approved, #16913
npm/npmjs/@rollup/rollup-win32-x64-msvc/4.24.0, MIT AND (ISC AND MIT), approved, #16902
npm/npmjs/@rtsao/scc/1.1.0, MIT, approved, clearlydefined
npm/npmjs/@sinclair/typebox/0.27.8, MIT, approved, clearlydefined
npm/npmjs/@sinonjs/commons/3.0.1, BSD-3-Clause, approved, #12905
Expand Down
8 changes: 6 additions & 2 deletions src/assets/locales/de/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -2261,8 +2261,12 @@
"success": "OSP-Rückruf erfolgreich konfiguriert",
"callbackUrlError": "Fehler beim Konfigurieren des OSP-Rückrufs",
"callbackUrl": {
"name": "Rückruf-URL",
"hint": "Geben Sie die Rückruf-URL Ihres IDP ein, die mit „/.well-known/openid-configuration“ endet'"
"name": "Statusrückruf URL",
"hint": "Statusrückruf URL ist verpflichtend"
},
"authUrl": {
"name": "Auth URL",
"hint": "Statusrückruf URL ist verpflichtend"
},
"clientId": {
"name": "Kunden-ID",
Expand Down
6 changes: 5 additions & 1 deletion src/assets/locales/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -2236,7 +2236,11 @@
"callbackUrlError": "Failed configuring OSP callback",
"callbackUrl": {
"name": "Callback URL",
"hint": "Enter the callback URL from your IDP that ends with '/.well-known/openid-configuration'"
"hint": "Status callback URL is mandatory"
},
"authUrl": {
"name": "Auth URL",
"hint": "Auth URL is mandatory"
},
"clientId": {
"name": "Client ID",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ const OnboardingServiceProvider = () => {
)
}

const isWellknownMetadata = (expr: string) =>
isURL(expr) && expr.endsWith('.well-known/openid-configuration')

const updateCallbackIDP = async () => {
if (!(data && callbackData)) return
setLoading(true)
Expand Down Expand Up @@ -127,15 +124,15 @@ const OnboardingServiceProvider = () => {
callbackUrl: current.callbackUrl,
clientId: current.clientId,
clientSecret: current.clientSecret,
authUrl: '',
authUrl: current.authUrl,
}
: undefined
)
return true
}

return (
<main className="onboarding-service-page-container ">
<main className="onboarding-service-page-container">
<section>
<Dialog
open={overlayOpen}
Expand Down Expand Up @@ -172,13 +169,24 @@ const OnboardingServiceProvider = () => {
'content.onboardingServiceProvider.callbackUrl.name'
)}
value={data?.callbackUrl}
validate={(expr) => isWellknownMetadata(expr)}
validate={(expr) => isURL(expr)}
Usmanfee marked this conversation as resolved.
Show resolved Hide resolved
hint={t('content.onboardingServiceProvider.callbackUrl.hint')}
debounceTime={0}
onValid={checkValidData}
/>
</div>
<div style={{ margin: '12px 0' }}>
<div style={{ marginTop: '34px' }}>
Usmanfee marked this conversation as resolved.
Show resolved Hide resolved
<ValidatingInput
name="authUrl"
label={t('content.onboardingServiceProvider.authUrl.name')}
value={data?.authUrl}
validate={(expr) => isURL(expr)}
hint={t('content.onboardingServiceProvider.authUrl.hint')}
debounceTime={0}
onValid={checkValidData}
/>
</div>
<div style={{ margin: '15px 0' }}>
<ValidatingInput
name="clientId"
label={t('content.onboardingServiceProvider.clientId.name')}
Expand Down
Loading