|
@@ -1,14 +1,12 @@
|
|
|
-import React, { useEffect, useCallback } from 'react';
|
|
|
|
|
-
|
|
|
|
|
|
|
+import React, { useCallback, useEffect } from 'react';
|
|
|
import { pathUtils } from '@growi/core/dist/utils';
|
|
import { pathUtils } from '@growi/core/dist/utils';
|
|
|
import { useTranslation } from 'next-i18next';
|
|
import { useTranslation } from 'next-i18next';
|
|
|
import { useForm } from 'react-hook-form';
|
|
import { useForm } from 'react-hook-form';
|
|
|
import urljoin from 'url-join';
|
|
import urljoin from 'url-join';
|
|
|
|
|
|
|
|
-
|
|
|
|
|
import AdminGeneralSecurityContainer from '~/client/services/AdminGeneralSecurityContainer';
|
|
import AdminGeneralSecurityContainer from '~/client/services/AdminGeneralSecurityContainer';
|
|
|
import AdminOidcSecurityContainer from '~/client/services/AdminOidcSecurityContainer';
|
|
import AdminOidcSecurityContainer from '~/client/services/AdminOidcSecurityContainer';
|
|
|
-import { toastSuccess, toastError } from '~/client/util/toastr';
|
|
|
|
|
|
|
+import { toastError, toastSuccess } from '~/client/util/toastr';
|
|
|
import { useSiteUrlWithEmptyValueWarn } from '~/states/global';
|
|
import { useSiteUrlWithEmptyValueWarn } from '~/states/global';
|
|
|
|
|
|
|
|
import { withUnstatedContainers } from '../../UnstatedUtils';
|
|
import { withUnstatedContainers } from '../../UnstatedUtils';
|
|
@@ -22,18 +20,31 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
const { t } = useTranslation('admin');
|
|
const { t } = useTranslation('admin');
|
|
|
const siteUrl = useSiteUrlWithEmptyValueWarn();
|
|
const siteUrl = useSiteUrlWithEmptyValueWarn();
|
|
|
|
|
|
|
|
- const {
|
|
|
|
|
- adminGeneralSecurityContainer, adminOidcSecurityContainer,
|
|
|
|
|
- } = props;
|
|
|
|
|
|
|
+ const { adminGeneralSecurityContainer, adminOidcSecurityContainer } = props;
|
|
|
const { isOidcEnabled } = adminGeneralSecurityContainer.state;
|
|
const { isOidcEnabled } = adminGeneralSecurityContainer.state;
|
|
|
const {
|
|
const {
|
|
|
- oidcProviderName, oidcIssuerHost, oidcClientId, oidcClientSecret,
|
|
|
|
|
- oidcAuthorizationEndpoint, oidcTokenEndpoint, oidcRevocationEndpoint, oidcIntrospectionEndpoint,
|
|
|
|
|
- oidcUserInfoEndpoint, oidcEndSessionEndpoint, oidcRegistrationEndpoint, oidcJWKSUri,
|
|
|
|
|
- oidcAttrMapId, oidcAttrMapUserName, oidcAttrMapName, oidcAttrMapEmail,
|
|
|
|
|
|
|
+ oidcProviderName,
|
|
|
|
|
+ oidcIssuerHost,
|
|
|
|
|
+ oidcClientId,
|
|
|
|
|
+ oidcClientSecret,
|
|
|
|
|
+ oidcAuthorizationEndpoint,
|
|
|
|
|
+ oidcTokenEndpoint,
|
|
|
|
|
+ oidcRevocationEndpoint,
|
|
|
|
|
+ oidcIntrospectionEndpoint,
|
|
|
|
|
+ oidcUserInfoEndpoint,
|
|
|
|
|
+ oidcEndSessionEndpoint,
|
|
|
|
|
+ oidcRegistrationEndpoint,
|
|
|
|
|
+ oidcJWKSUri,
|
|
|
|
|
+ oidcAttrMapId,
|
|
|
|
|
+ oidcAttrMapUserName,
|
|
|
|
|
+ oidcAttrMapName,
|
|
|
|
|
+ oidcAttrMapEmail,
|
|
|
} = adminOidcSecurityContainer.state;
|
|
} = adminOidcSecurityContainer.state;
|
|
|
|
|
|
|
|
- const oidcCallbackUrl = urljoin(pathUtils.removeTrailingSlash(siteUrl), '/passport/oidc/callback');
|
|
|
|
|
|
|
+ const oidcCallbackUrl = urljoin(
|
|
|
|
|
+ pathUtils.removeTrailingSlash(siteUrl),
|
|
|
|
|
+ '/passport/oidc/callback',
|
|
|
|
|
+ );
|
|
|
|
|
|
|
|
const { register, handleSubmit, reset } = useForm();
|
|
const { register, handleSubmit, reset } = useForm();
|
|
|
|
|
|
|
@@ -57,41 +68,59 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
oidcAttrMapEmail,
|
|
oidcAttrMapEmail,
|
|
|
});
|
|
});
|
|
|
}, [
|
|
}, [
|
|
|
- reset, oidcProviderName, oidcIssuerHost, oidcClientId, oidcClientSecret,
|
|
|
|
|
- oidcAuthorizationEndpoint, oidcTokenEndpoint, oidcRevocationEndpoint, oidcIntrospectionEndpoint,
|
|
|
|
|
- oidcUserInfoEndpoint, oidcEndSessionEndpoint, oidcRegistrationEndpoint, oidcJWKSUri,
|
|
|
|
|
- oidcAttrMapId, oidcAttrMapUserName, oidcAttrMapName, oidcAttrMapEmail,
|
|
|
|
|
|
|
+ reset,
|
|
|
|
|
+ oidcProviderName,
|
|
|
|
|
+ oidcIssuerHost,
|
|
|
|
|
+ oidcClientId,
|
|
|
|
|
+ oidcClientSecret,
|
|
|
|
|
+ oidcAuthorizationEndpoint,
|
|
|
|
|
+ oidcTokenEndpoint,
|
|
|
|
|
+ oidcRevocationEndpoint,
|
|
|
|
|
+ oidcIntrospectionEndpoint,
|
|
|
|
|
+ oidcUserInfoEndpoint,
|
|
|
|
|
+ oidcEndSessionEndpoint,
|
|
|
|
|
+ oidcRegistrationEndpoint,
|
|
|
|
|
+ oidcJWKSUri,
|
|
|
|
|
+ oidcAttrMapId,
|
|
|
|
|
+ oidcAttrMapUserName,
|
|
|
|
|
+ oidcAttrMapName,
|
|
|
|
|
+ oidcAttrMapEmail,
|
|
|
]);
|
|
]);
|
|
|
|
|
|
|
|
- const onSubmit = useCallback(async(data) => {
|
|
|
|
|
- try {
|
|
|
|
|
- await adminOidcSecurityContainer.updateOidcSetting({
|
|
|
|
|
- oidcProviderName: data.oidcProviderName,
|
|
|
|
|
- oidcIssuerHost: data.oidcIssuerHost,
|
|
|
|
|
- oidcClientId: data.oidcClientId,
|
|
|
|
|
- oidcClientSecret: data.oidcClientSecret,
|
|
|
|
|
- oidcAuthorizationEndpoint: data.oidcAuthorizationEndpoint,
|
|
|
|
|
- oidcTokenEndpoint: data.oidcTokenEndpoint,
|
|
|
|
|
- oidcRevocationEndpoint: data.oidcRevocationEndpoint,
|
|
|
|
|
- oidcIntrospectionEndpoint: data.oidcIntrospectionEndpoint,
|
|
|
|
|
- oidcUserInfoEndpoint: data.oidcUserInfoEndpoint,
|
|
|
|
|
- oidcEndSessionEndpoint: data.oidcEndSessionEndpoint,
|
|
|
|
|
- oidcRegistrationEndpoint: data.oidcRegistrationEndpoint,
|
|
|
|
|
- oidcJWKSUri: data.oidcJWKSUri,
|
|
|
|
|
- oidcAttrMapId: data.oidcAttrMapId,
|
|
|
|
|
- oidcAttrMapUserName: data.oidcAttrMapUserName,
|
|
|
|
|
- oidcAttrMapName: data.oidcAttrMapName,
|
|
|
|
|
- oidcAttrMapEmail: data.oidcAttrMapEmail,
|
|
|
|
|
- isSameUsernameTreatedAsIdenticalUser: adminOidcSecurityContainer.state.isSameUsernameTreatedAsIdenticalUser,
|
|
|
|
|
- isSameEmailTreatedAsIdenticalUser: adminOidcSecurityContainer.state.isSameEmailTreatedAsIdenticalUser,
|
|
|
|
|
- });
|
|
|
|
|
- await adminGeneralSecurityContainer.retrieveSetupStratedies();
|
|
|
|
|
- toastSuccess(t('security_settings.OAuth.OIDC.updated_oidc'));
|
|
|
|
|
- }
|
|
|
|
|
- catch (err) {
|
|
|
|
|
- toastError(err);
|
|
|
|
|
- }
|
|
|
|
|
- }, [t, adminOidcSecurityContainer, adminGeneralSecurityContainer]);
|
|
|
|
|
|
|
+ const onSubmit = useCallback(
|
|
|
|
|
+ async (data) => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ await adminOidcSecurityContainer.updateOidcSetting({
|
|
|
|
|
+ oidcProviderName: data.oidcProviderName,
|
|
|
|
|
+ oidcIssuerHost: data.oidcIssuerHost,
|
|
|
|
|
+ oidcClientId: data.oidcClientId,
|
|
|
|
|
+ oidcClientSecret: data.oidcClientSecret,
|
|
|
|
|
+ oidcAuthorizationEndpoint: data.oidcAuthorizationEndpoint,
|
|
|
|
|
+ oidcTokenEndpoint: data.oidcTokenEndpoint,
|
|
|
|
|
+ oidcRevocationEndpoint: data.oidcRevocationEndpoint,
|
|
|
|
|
+ oidcIntrospectionEndpoint: data.oidcIntrospectionEndpoint,
|
|
|
|
|
+ oidcUserInfoEndpoint: data.oidcUserInfoEndpoint,
|
|
|
|
|
+ oidcEndSessionEndpoint: data.oidcEndSessionEndpoint,
|
|
|
|
|
+ oidcRegistrationEndpoint: data.oidcRegistrationEndpoint,
|
|
|
|
|
+ oidcJWKSUri: data.oidcJWKSUri,
|
|
|
|
|
+ oidcAttrMapId: data.oidcAttrMapId,
|
|
|
|
|
+ oidcAttrMapUserName: data.oidcAttrMapUserName,
|
|
|
|
|
+ oidcAttrMapName: data.oidcAttrMapName,
|
|
|
|
|
+ oidcAttrMapEmail: data.oidcAttrMapEmail,
|
|
|
|
|
+ isSameUsernameTreatedAsIdenticalUser:
|
|
|
|
|
+ adminOidcSecurityContainer.state
|
|
|
|
|
+ .isSameUsernameTreatedAsIdenticalUser,
|
|
|
|
|
+ isSameEmailTreatedAsIdenticalUser:
|
|
|
|
|
+ adminOidcSecurityContainer.state.isSameEmailTreatedAsIdenticalUser,
|
|
|
|
|
+ });
|
|
|
|
|
+ await adminGeneralSecurityContainer.retrieveSetupStratedies();
|
|
|
|
|
+ toastSuccess(t('security_settings.OAuth.OIDC.updated_oidc'));
|
|
|
|
|
+ } catch (err) {
|
|
|
|
|
+ toastError(err);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ [t, adminOidcSecurityContainer, adminGeneralSecurityContainer],
|
|
|
|
|
+ );
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<>
|
|
<>
|
|
@@ -107,19 +136,32 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
className="form-check-input"
|
|
className="form-check-input"
|
|
|
type="checkbox"
|
|
type="checkbox"
|
|
|
checked={adminGeneralSecurityContainer.state.isOidcEnabled}
|
|
checked={adminGeneralSecurityContainer.state.isOidcEnabled}
|
|
|
- onChange={() => { adminGeneralSecurityContainer.switchIsOidcEnabled() }}
|
|
|
|
|
|
|
+ onChange={() => {
|
|
|
|
|
+ adminGeneralSecurityContainer.switchIsOidcEnabled();
|
|
|
|
|
+ }}
|
|
|
/>
|
|
/>
|
|
|
- <label className="form-label form-check-label" htmlFor="isOidcEnabled">
|
|
|
|
|
|
|
+ <label
|
|
|
|
|
+ className="form-label form-check-label"
|
|
|
|
|
+ htmlFor="isOidcEnabled"
|
|
|
|
|
+ >
|
|
|
{t('security_settings.OAuth.enable_oidc')}
|
|
{t('security_settings.OAuth.enable_oidc')}
|
|
|
</label>
|
|
</label>
|
|
|
</div>
|
|
</div>
|
|
|
- {(!adminGeneralSecurityContainer.state.setupStrategies.includes('oidc') && isOidcEnabled)
|
|
|
|
|
- && <div className="badge text-bg-warning">{t('security_settings.setup_is_not_yet_complete')}</div>}
|
|
|
|
|
|
|
+ {!adminGeneralSecurityContainer.state.setupStrategies.includes(
|
|
|
|
|
+ 'oidc',
|
|
|
|
|
+ ) &&
|
|
|
|
|
+ isOidcEnabled && (
|
|
|
|
|
+ <div className="badge text-bg-warning">
|
|
|
|
|
+ {t('security_settings.setup_is_not_yet_complete')}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ )}
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div className="row mb-5">
|
|
<div className="row mb-5">
|
|
|
- <label className="text-start text-md-end col-md-3 col-form-label">{t('security_settings.callback_URL')}</label>
|
|
|
|
|
|
|
+ <label className="text-start text-md-end col-md-3 col-form-label">
|
|
|
|
|
+ {t('security_settings.callback_URL')}
|
|
|
|
|
+ </label>
|
|
|
<div className="col-md-6">
|
|
<div className="col-md-6">
|
|
|
<input
|
|
<input
|
|
|
className="form-control"
|
|
className="form-control"
|
|
@@ -127,13 +169,20 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
value={oidcCallbackUrl}
|
|
value={oidcCallbackUrl}
|
|
|
readOnly
|
|
readOnly
|
|
|
/>
|
|
/>
|
|
|
- <p className="form-text text-muted small">{t('security_settings.desc_of_callback_URL', { AuthName: 'OAuth' })}</p>
|
|
|
|
|
|
|
+ <p className="form-text text-muted small">
|
|
|
|
|
+ {t('security_settings.desc_of_callback_URL', { AuthName: 'OAuth' })}
|
|
|
|
|
+ </p>
|
|
|
{(siteUrl == null || siteUrl === '') && (
|
|
{(siteUrl == null || siteUrl === '') && (
|
|
|
<div className="alert alert-danger">
|
|
<div className="alert alert-danger">
|
|
|
<span className="material-symbols-outlined">error</span>
|
|
<span className="material-symbols-outlined">error</span>
|
|
|
<span
|
|
<span
|
|
|
// eslint-disable-next-line max-len
|
|
// eslint-disable-next-line max-len
|
|
|
- dangerouslySetInnerHTML={{ __html: t('alert.siteUrl_is_not_set', { link: `<a href="/admin/app">${t('headers.app_settings', { ns: 'commons' })}<span class="material-symbols-outlined">login</span></a>`, ns: 'commons' }) }}
|
|
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t('alert.siteUrl_is_not_set', {
|
|
|
|
|
+ link: `<a href="/admin/app">${t('headers.app_settings', { ns: 'commons' })}<span class="material-symbols-outlined">login</span></a>`,
|
|
|
|
|
+ ns: 'commons',
|
|
|
|
|
+ }),
|
|
|
|
|
+ }}
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
)}
|
|
)}
|
|
@@ -142,11 +191,17 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
|
|
|
|
|
{isOidcEnabled && (
|
|
{isOidcEnabled && (
|
|
|
<form onSubmit={handleSubmit(onSubmit)}>
|
|
<form onSubmit={handleSubmit(onSubmit)}>
|
|
|
-
|
|
|
|
|
- <h3 className="border-bottom mb-4">{t('security_settings.configuration')}</h3>
|
|
|
|
|
|
|
+ <h3 className="border-bottom mb-4">
|
|
|
|
|
+ {t('security_settings.configuration')}
|
|
|
|
|
+ </h3>
|
|
|
|
|
|
|
|
<div className="row mb-4">
|
|
<div className="row mb-4">
|
|
|
- <label htmlFor="oidcProviderName" className="text-start text-md-end col-md-3 col-form-label">{t('security_settings.providerName')}</label>
|
|
|
|
|
|
|
+ <label
|
|
|
|
|
+ htmlFor="oidcProviderName"
|
|
|
|
|
+ className="text-start text-md-end col-md-3 col-form-label"
|
|
|
|
|
+ >
|
|
|
|
|
+ {t('security_settings.providerName')}
|
|
|
|
|
+ </label>
|
|
|
<div className="col-md-6">
|
|
<div className="col-md-6">
|
|
|
<input
|
|
<input
|
|
|
className="form-control"
|
|
className="form-control"
|
|
@@ -157,7 +212,12 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div className="row mb-4">
|
|
<div className="row mb-4">
|
|
|
- <label htmlFor="oidcIssuerHost" className="text-start text-md-end col-md-3 col-form-label">{t('security_settings.issuerHost')}</label>
|
|
|
|
|
|
|
+ <label
|
|
|
|
|
+ htmlFor="oidcIssuerHost"
|
|
|
|
|
+ className="text-start text-md-end col-md-3 col-form-label"
|
|
|
|
|
+ >
|
|
|
|
|
+ {t('security_settings.issuerHost')}
|
|
|
|
|
+ </label>
|
|
|
<div className="col-md-6">
|
|
<div className="col-md-6">
|
|
|
<input
|
|
<input
|
|
|
className="form-control"
|
|
className="form-control"
|
|
@@ -165,13 +225,24 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
{...register('oidcIssuerHost')}
|
|
{...register('oidcIssuerHost')}
|
|
|
/>
|
|
/>
|
|
|
<p className="form-text text-muted">
|
|
<p className="form-text text-muted">
|
|
|
- <small dangerouslySetInnerHTML={{ __html: t('security_settings.Use env var if empty', { env: 'OAUTH_OIDC_ISSUER_HOST' }) }} />
|
|
|
|
|
|
|
+ <small
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t('security_settings.Use env var if empty', {
|
|
|
|
|
+ env: 'OAUTH_OIDC_ISSUER_HOST',
|
|
|
|
|
+ }),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div className="row mb-4">
|
|
<div className="row mb-4">
|
|
|
- <label htmlFor="oidcClientId" className="text-start text-md-end col-md-3 col-form-label">{t('security_settings.clientID')}</label>
|
|
|
|
|
|
|
+ <label
|
|
|
|
|
+ htmlFor="oidcClientId"
|
|
|
|
|
+ className="text-start text-md-end col-md-3 col-form-label"
|
|
|
|
|
+ >
|
|
|
|
|
+ {t('security_settings.clientID')}
|
|
|
|
|
+ </label>
|
|
|
<div className="col-md-6">
|
|
<div className="col-md-6">
|
|
|
<input
|
|
<input
|
|
|
className="form-control"
|
|
className="form-control"
|
|
@@ -179,13 +250,24 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
{...register('oidcClientId')}
|
|
{...register('oidcClientId')}
|
|
|
/>
|
|
/>
|
|
|
<p className="form-text text-muted">
|
|
<p className="form-text text-muted">
|
|
|
- <small dangerouslySetInnerHTML={{ __html: t('security_settings.Use env var if empty', { env: 'OAUTH_OIDC_CLIENT_ID' }) }} />
|
|
|
|
|
|
|
+ <small
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t('security_settings.Use env var if empty', {
|
|
|
|
|
+ env: 'OAUTH_OIDC_CLIENT_ID',
|
|
|
|
|
+ }),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div className="row mb-4">
|
|
<div className="row mb-4">
|
|
|
- <label htmlFor="oidcClientSecret" className="text-start text-md-end col-md-3 col-form-label">{t('security_settings.client_secret')}</label>
|
|
|
|
|
|
|
+ <label
|
|
|
|
|
+ htmlFor="oidcClientSecret"
|
|
|
|
|
+ className="text-start text-md-end col-md-3 col-form-label"
|
|
|
|
|
+ >
|
|
|
|
|
+ {t('security_settings.client_secret')}
|
|
|
|
|
+ </label>
|
|
|
<div className="col-md-6">
|
|
<div className="col-md-6">
|
|
|
<input
|
|
<input
|
|
|
className="form-control"
|
|
className="form-control"
|
|
@@ -193,13 +275,22 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
{...register('oidcClientSecret')}
|
|
{...register('oidcClientSecret')}
|
|
|
/>
|
|
/>
|
|
|
<p className="form-text text-muted">
|
|
<p className="form-text text-muted">
|
|
|
- <small dangerouslySetInnerHTML={{ __html: t('security_settings.Use env var if empty', { env: 'OAUTH_OIDC_CLIENT_SECRET' }) }} />
|
|
|
|
|
|
|
+ <small
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t('security_settings.Use env var if empty', {
|
|
|
|
|
+ env: 'OAUTH_OIDC_CLIENT_SECRET',
|
|
|
|
|
+ }),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div className="row mb-4">
|
|
<div className="row mb-4">
|
|
|
- <label htmlFor="oidcAuthorizationEndpoint" className="text-start text-md-end col-md-3 col-form-label">
|
|
|
|
|
|
|
+ <label
|
|
|
|
|
+ htmlFor="oidcAuthorizationEndpoint"
|
|
|
|
|
+ className="text-start text-md-end col-md-3 col-form-label"
|
|
|
|
|
+ >
|
|
|
{t('security_settings.authorization_endpoint')}
|
|
{t('security_settings.authorization_endpoint')}
|
|
|
</label>
|
|
</label>
|
|
|
<div className="col-md-6">
|
|
<div className="col-md-6">
|
|
@@ -209,13 +300,24 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
{...register('oidcAuthorizationEndpoint')}
|
|
{...register('oidcAuthorizationEndpoint')}
|
|
|
/>
|
|
/>
|
|
|
<p className="form-text text-muted">
|
|
<p className="form-text text-muted">
|
|
|
- <small dangerouslySetInnerHTML={{ __html: t('security_settings.OAuth.OIDC.Use discovered URL if empty') }} />
|
|
|
|
|
|
|
+ <small
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t(
|
|
|
|
|
+ 'security_settings.OAuth.OIDC.Use discovered URL if empty',
|
|
|
|
|
+ ),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div className="row mb-4">
|
|
<div className="row mb-4">
|
|
|
- <label htmlFor="oidcTokenEndpoint" className="text-start text-md-end col-md-3 col-form-label">{t('security_settings.token_endpoint')}</label>
|
|
|
|
|
|
|
+ <label
|
|
|
|
|
+ htmlFor="oidcTokenEndpoint"
|
|
|
|
|
+ className="text-start text-md-end col-md-3 col-form-label"
|
|
|
|
|
+ >
|
|
|
|
|
+ {t('security_settings.token_endpoint')}
|
|
|
|
|
+ </label>
|
|
|
<div className="col-md-6">
|
|
<div className="col-md-6">
|
|
|
<input
|
|
<input
|
|
|
className="form-control"
|
|
className="form-control"
|
|
@@ -223,13 +325,22 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
{...register('oidcTokenEndpoint')}
|
|
{...register('oidcTokenEndpoint')}
|
|
|
/>
|
|
/>
|
|
|
<p className="form-text text-muted">
|
|
<p className="form-text text-muted">
|
|
|
- <small dangerouslySetInnerHTML={{ __html: t('security_settings.OAuth.OIDC.Use discovered URL if empty') }} />
|
|
|
|
|
|
|
+ <small
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t(
|
|
|
|
|
+ 'security_settings.OAuth.OIDC.Use discovered URL if empty',
|
|
|
|
|
+ ),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div className="row mb-4">
|
|
<div className="row mb-4">
|
|
|
- <label htmlFor="oidcRevocationEndpoint" className="text-start text-md-end col-md-3 col-form-label">
|
|
|
|
|
|
|
+ <label
|
|
|
|
|
+ htmlFor="oidcRevocationEndpoint"
|
|
|
|
|
+ className="text-start text-md-end col-md-3 col-form-label"
|
|
|
|
|
+ >
|
|
|
{t('security_settings.revocation_endpoint')}
|
|
{t('security_settings.revocation_endpoint')}
|
|
|
</label>
|
|
</label>
|
|
|
<div className="col-md-6">
|
|
<div className="col-md-6">
|
|
@@ -239,13 +350,22 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
{...register('oidcRevocationEndpoint')}
|
|
{...register('oidcRevocationEndpoint')}
|
|
|
/>
|
|
/>
|
|
|
<p className="form-text text-muted">
|
|
<p className="form-text text-muted">
|
|
|
- <small dangerouslySetInnerHTML={{ __html: t('security_settings.OAuth.OIDC.Use discovered URL if empty') }} />
|
|
|
|
|
|
|
+ <small
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t(
|
|
|
|
|
+ 'security_settings.OAuth.OIDC.Use discovered URL if empty',
|
|
|
|
|
+ ),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div className="row mb-4">
|
|
<div className="row mb-4">
|
|
|
- <label htmlFor="oidcIntrospectionEndpoint" className="text-start text-md-end col-md-3 col-form-label">
|
|
|
|
|
|
|
+ <label
|
|
|
|
|
+ htmlFor="oidcIntrospectionEndpoint"
|
|
|
|
|
+ className="text-start text-md-end col-md-3 col-form-label"
|
|
|
|
|
+ >
|
|
|
{t('security_settings.introspection_endpoint')}
|
|
{t('security_settings.introspection_endpoint')}
|
|
|
</label>
|
|
</label>
|
|
|
<div className="col-md-6">
|
|
<div className="col-md-6">
|
|
@@ -255,13 +375,22 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
{...register('oidcIntrospectionEndpoint')}
|
|
{...register('oidcIntrospectionEndpoint')}
|
|
|
/>
|
|
/>
|
|
|
<p className="form-text text-muted">
|
|
<p className="form-text text-muted">
|
|
|
- <small dangerouslySetInnerHTML={{ __html: t('security_settings.OAuth.OIDC.Use discovered URL if empty') }} />
|
|
|
|
|
|
|
+ <small
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t(
|
|
|
|
|
+ 'security_settings.OAuth.OIDC.Use discovered URL if empty',
|
|
|
|
|
+ ),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div className="row mb-4">
|
|
<div className="row mb-4">
|
|
|
- <label htmlFor="oidcUserInfoEndpoint" className="text-start text-md-end col-md-3 col-form-label">
|
|
|
|
|
|
|
+ <label
|
|
|
|
|
+ htmlFor="oidcUserInfoEndpoint"
|
|
|
|
|
+ className="text-start text-md-end col-md-3 col-form-label"
|
|
|
|
|
+ >
|
|
|
{t('security_settings.userinfo_endpoint')}
|
|
{t('security_settings.userinfo_endpoint')}
|
|
|
</label>
|
|
</label>
|
|
|
<div className="col-md-6">
|
|
<div className="col-md-6">
|
|
@@ -271,13 +400,22 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
{...register('oidcUserInfoEndpoint')}
|
|
{...register('oidcUserInfoEndpoint')}
|
|
|
/>
|
|
/>
|
|
|
<p className="form-text text-muted">
|
|
<p className="form-text text-muted">
|
|
|
- <small dangerouslySetInnerHTML={{ __html: t('security_settings.OAuth.OIDC.Use discovered URL if empty') }} />
|
|
|
|
|
|
|
+ <small
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t(
|
|
|
|
|
+ 'security_settings.OAuth.OIDC.Use discovered URL if empty',
|
|
|
|
|
+ ),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div className="row mb-4">
|
|
<div className="row mb-4">
|
|
|
- <label htmlFor="oidcEndSessionEndpoint" className="text-start text-md-end col-md-3 col-form-label">
|
|
|
|
|
|
|
+ <label
|
|
|
|
|
+ htmlFor="oidcEndSessionEndpoint"
|
|
|
|
|
+ className="text-start text-md-end col-md-3 col-form-label"
|
|
|
|
|
+ >
|
|
|
{t('security_settings.end_session_endpoint')}
|
|
{t('security_settings.end_session_endpoint')}
|
|
|
</label>
|
|
</label>
|
|
|
<div className="col-md-6">
|
|
<div className="col-md-6">
|
|
@@ -287,13 +425,22 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
{...register('oidcEndSessionEndpoint')}
|
|
{...register('oidcEndSessionEndpoint')}
|
|
|
/>
|
|
/>
|
|
|
<p className="form-text text-muted">
|
|
<p className="form-text text-muted">
|
|
|
- <small dangerouslySetInnerHTML={{ __html: t('security_settings.OAuth.OIDC.Use discovered URL if empty') }} />
|
|
|
|
|
|
|
+ <small
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t(
|
|
|
|
|
+ 'security_settings.OAuth.OIDC.Use discovered URL if empty',
|
|
|
|
|
+ ),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div className="row mb-4">
|
|
<div className="row mb-4">
|
|
|
- <label htmlFor="oidcRegistrationEndpoint" className="text-start text-md-end col-md-3 col-form-label">
|
|
|
|
|
|
|
+ <label
|
|
|
|
|
+ htmlFor="oidcRegistrationEndpoint"
|
|
|
|
|
+ className="text-start text-md-end col-md-3 col-form-label"
|
|
|
|
|
+ >
|
|
|
{t('security_settings.registration_endpoint')}
|
|
{t('security_settings.registration_endpoint')}
|
|
|
</label>
|
|
</label>
|
|
|
<div className="col-md-6">
|
|
<div className="col-md-6">
|
|
@@ -303,13 +450,24 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
{...register('oidcRegistrationEndpoint')}
|
|
{...register('oidcRegistrationEndpoint')}
|
|
|
/>
|
|
/>
|
|
|
<p className="form-text text-muted">
|
|
<p className="form-text text-muted">
|
|
|
- <small dangerouslySetInnerHTML={{ __html: t('security_settings.OAuth.OIDC.Use discovered URL if empty') }} />
|
|
|
|
|
|
|
+ <small
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t(
|
|
|
|
|
+ 'security_settings.OAuth.OIDC.Use discovered URL if empty',
|
|
|
|
|
+ ),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div className="row mb-4">
|
|
<div className="row mb-4">
|
|
|
- <label htmlFor="oidcJWKSUri" className="text-start text-md-end col-md-3 col-form-label">{t('security_settings.jwks_uri')}</label>
|
|
|
|
|
|
|
+ <label
|
|
|
|
|
+ htmlFor="oidcJWKSUri"
|
|
|
|
|
+ className="text-start text-md-end col-md-3 col-form-label"
|
|
|
|
|
+ >
|
|
|
|
|
+ {t('security_settings.jwks_uri')}
|
|
|
|
|
+ </label>
|
|
|
<div className="col-md-6">
|
|
<div className="col-md-6">
|
|
|
<input
|
|
<input
|
|
|
className="form-control"
|
|
className="form-control"
|
|
@@ -317,7 +475,13 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
{...register('oidcJWKSUri')}
|
|
{...register('oidcJWKSUri')}
|
|
|
/>
|
|
/>
|
|
|
<p className="form-text text-muted">
|
|
<p className="form-text text-muted">
|
|
|
- <small dangerouslySetInnerHTML={{ __html: t('security_settings.OAuth.OIDC.Use discovered URL if empty') }} />
|
|
|
|
|
|
|
+ <small
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t(
|
|
|
|
|
+ 'security_settings.OAuth.OIDC.Use discovered URL if empty',
|
|
|
|
|
+ ),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -327,7 +491,12 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
</h3>
|
|
</h3>
|
|
|
|
|
|
|
|
<div className="row mb-4">
|
|
<div className="row mb-4">
|
|
|
- <label htmlFor="oidcAttrMapId" className="text-start text-md-end col-md-3 col-form-label">Identifier</label>
|
|
|
|
|
|
|
+ <label
|
|
|
|
|
+ htmlFor="oidcAttrMapId"
|
|
|
|
|
+ className="text-start text-md-end col-md-3 col-form-label"
|
|
|
|
|
+ >
|
|
|
|
|
+ Identifier
|
|
|
|
|
+ </label>
|
|
|
<div className="col-md-6">
|
|
<div className="col-md-6">
|
|
|
<input
|
|
<input
|
|
|
className="form-control"
|
|
className="form-control"
|
|
@@ -335,13 +504,22 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
{...register('oidcAttrMapId')}
|
|
{...register('oidcAttrMapId')}
|
|
|
/>
|
|
/>
|
|
|
<p className="form-text text-muted">
|
|
<p className="form-text text-muted">
|
|
|
- <small dangerouslySetInnerHTML={{ __html: t('security_settings.OAuth.OIDC.id_detail') }} />
|
|
|
|
|
|
|
+ <small
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t('security_settings.OAuth.OIDC.id_detail'),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div className="row mb-4">
|
|
<div className="row mb-4">
|
|
|
- <label htmlFor="oidcAttrMapUserName" className="text-start text-md-end col-md-3 col-form-label">{t('username')}</label>
|
|
|
|
|
|
|
+ <label
|
|
|
|
|
+ htmlFor="oidcAttrMapUserName"
|
|
|
|
|
+ className="text-start text-md-end col-md-3 col-form-label"
|
|
|
|
|
+ >
|
|
|
|
|
+ {t('username')}
|
|
|
|
|
+ </label>
|
|
|
<div className="col-md-6">
|
|
<div className="col-md-6">
|
|
|
<input
|
|
<input
|
|
|
className="form-control"
|
|
className="form-control"
|
|
@@ -349,13 +527,22 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
{...register('oidcAttrMapUserName')}
|
|
{...register('oidcAttrMapUserName')}
|
|
|
/>
|
|
/>
|
|
|
<p className="form-text text-muted">
|
|
<p className="form-text text-muted">
|
|
|
- <small dangerouslySetInnerHTML={{ __html: t('security_settings.OAuth.OIDC.username_detail') }} />
|
|
|
|
|
|
|
+ <small
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t('security_settings.OAuth.OIDC.username_detail'),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div className="row mb-4">
|
|
<div className="row mb-4">
|
|
|
- <label htmlFor="oidcAttrMapName" className="text-start text-md-end col-md-3 col-form-label">{t('Name')}</label>
|
|
|
|
|
|
|
+ <label
|
|
|
|
|
+ htmlFor="oidcAttrMapName"
|
|
|
|
|
+ className="text-start text-md-end col-md-3 col-form-label"
|
|
|
|
|
+ >
|
|
|
|
|
+ {t('Name')}
|
|
|
|
|
+ </label>
|
|
|
<div className="col-md-6">
|
|
<div className="col-md-6">
|
|
|
<input
|
|
<input
|
|
|
className="form-control"
|
|
className="form-control"
|
|
@@ -363,13 +550,22 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
{...register('oidcAttrMapName')}
|
|
{...register('oidcAttrMapName')}
|
|
|
/>
|
|
/>
|
|
|
<p className="form-text text-muted">
|
|
<p className="form-text text-muted">
|
|
|
- <small dangerouslySetInnerHTML={{ __html: t('security_settings.OAuth.OIDC.name_detail') }} />
|
|
|
|
|
|
|
+ <small
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t('security_settings.OAuth.OIDC.name_detail'),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div className="row mb-4">
|
|
<div className="row mb-4">
|
|
|
- <label htmlFor="oidcAttrMapEmail" className="text-start text-md-end col-md-3 col-form-label">{t('Email')}</label>
|
|
|
|
|
|
|
+ <label
|
|
|
|
|
+ htmlFor="oidcAttrMapEmail"
|
|
|
|
|
+ className="text-start text-md-end col-md-3 col-form-label"
|
|
|
|
|
+ >
|
|
|
|
|
+ {t('Email')}
|
|
|
|
|
+ </label>
|
|
|
<div className="col-md-6">
|
|
<div className="col-md-6">
|
|
|
<input
|
|
<input
|
|
|
className="form-control"
|
|
className="form-control"
|
|
@@ -377,13 +573,21 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
{...register('oidcAttrMapEmail')}
|
|
{...register('oidcAttrMapEmail')}
|
|
|
/>
|
|
/>
|
|
|
<p className="form-text text-muted">
|
|
<p className="form-text text-muted">
|
|
|
- <small dangerouslySetInnerHTML={{ __html: t('security_settings.OAuth.OIDC.mapping_detail', { target: t('Email') }) }} />
|
|
|
|
|
|
|
+ <small
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t('security_settings.OAuth.OIDC.mapping_detail', {
|
|
|
|
|
+ target: t('Email'),
|
|
|
|
|
+ }),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div className="row mb-4">
|
|
<div className="row mb-4">
|
|
|
- <label className="form-label text-start text-md-end col-md-3 col-form-label">{t('security_settings.callback_URL')}</label>
|
|
|
|
|
|
|
+ <label className="form-label text-start text-md-end col-md-3 col-form-label">
|
|
|
|
|
+ {t('security_settings.callback_URL')}
|
|
|
|
|
+ </label>
|
|
|
<div className="col-md-6">
|
|
<div className="col-md-6">
|
|
|
<input
|
|
<input
|
|
|
className="form-control"
|
|
className="form-control"
|
|
@@ -391,13 +595,22 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
defaultValue={oidcCallbackUrl}
|
|
defaultValue={oidcCallbackUrl}
|
|
|
readOnly
|
|
readOnly
|
|
|
/>
|
|
/>
|
|
|
- <p className="form-text text-muted small">{t('security_settings.desc_of_callback_URL', { AuthName: 'OAuth' })}</p>
|
|
|
|
|
|
|
+ <p className="form-text text-muted small">
|
|
|
|
|
+ {t('security_settings.desc_of_callback_URL', {
|
|
|
|
|
+ AuthName: 'OAuth',
|
|
|
|
|
+ })}
|
|
|
|
|
+ </p>
|
|
|
{(siteUrl == null || siteUrl === '') && (
|
|
{(siteUrl == null || siteUrl === '') && (
|
|
|
<div className="alert alert-danger">
|
|
<div className="alert alert-danger">
|
|
|
<span className="material-symbols-outlined">error</span>
|
|
<span className="material-symbols-outlined">error</span>
|
|
|
<span
|
|
<span
|
|
|
// eslint-disable-next-line max-len
|
|
// eslint-disable-next-line max-len
|
|
|
- dangerouslySetInnerHTML={{ __html: t('alert.siteUrl_is_not_set', { link: `<a href="/admin/app">${t('headers.app_settings', { ns: 'commons' })}<span class="material-symbols-outlined">login</span></a>`, ns: 'commons' }) }}
|
|
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t('alert.siteUrl_is_not_set', {
|
|
|
|
|
+ link: `<a href="/admin/app">${t('headers.app_settings', { ns: 'commons' })}<span class="material-symbols-outlined">login</span></a>`,
|
|
|
|
|
+ ns: 'commons',
|
|
|
|
|
+ }),
|
|
|
|
|
+ }}
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
)}
|
|
)}
|
|
@@ -411,17 +624,32 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
id="bindByUserName-oidc"
|
|
id="bindByUserName-oidc"
|
|
|
className="form-check-input"
|
|
className="form-check-input"
|
|
|
type="checkbox"
|
|
type="checkbox"
|
|
|
- checked={adminOidcSecurityContainer.state.isSameUsernameTreatedAsIdenticalUser}
|
|
|
|
|
- onChange={() => { adminOidcSecurityContainer.switchIsSameUsernameTreatedAsIdenticalUser() }}
|
|
|
|
|
|
|
+ checked={
|
|
|
|
|
+ adminOidcSecurityContainer.state
|
|
|
|
|
+ .isSameUsernameTreatedAsIdenticalUser
|
|
|
|
|
+ }
|
|
|
|
|
+ onChange={() => {
|
|
|
|
|
+ adminOidcSecurityContainer.switchIsSameUsernameTreatedAsIdenticalUser();
|
|
|
|
|
+ }}
|
|
|
/>
|
|
/>
|
|
|
<label
|
|
<label
|
|
|
className="form-label form-check-label"
|
|
className="form-label form-check-label"
|
|
|
htmlFor="bindByUserName-oidc"
|
|
htmlFor="bindByUserName-oidc"
|
|
|
- dangerouslySetInnerHTML={{ __html: t('security_settings.Treat username matching as identical') }}
|
|
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t(
|
|
|
|
|
+ 'security_settings.Treat username matching as identical',
|
|
|
|
|
+ ),
|
|
|
|
|
+ }}
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
<p className="form-text text-muted">
|
|
<p className="form-text text-muted">
|
|
|
- <small dangerouslySetInnerHTML={{ __html: t('security_settings.Treat username matching as identical_warn') }} />
|
|
|
|
|
|
|
+ <small
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t(
|
|
|
|
|
+ 'security_settings.Treat username matching as identical_warn',
|
|
|
|
|
+ ),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -433,17 +661,32 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
id="bindByEmail-oidc"
|
|
id="bindByEmail-oidc"
|
|
|
className="form-check-input"
|
|
className="form-check-input"
|
|
|
type="checkbox"
|
|
type="checkbox"
|
|
|
- checked={adminOidcSecurityContainer.state.isSameEmailTreatedAsIdenticalUser || false}
|
|
|
|
|
- onChange={() => { adminOidcSecurityContainer.switchIsSameEmailTreatedAsIdenticalUser() }}
|
|
|
|
|
|
|
+ checked={
|
|
|
|
|
+ adminOidcSecurityContainer.state
|
|
|
|
|
+ .isSameEmailTreatedAsIdenticalUser || false
|
|
|
|
|
+ }
|
|
|
|
|
+ onChange={() => {
|
|
|
|
|
+ adminOidcSecurityContainer.switchIsSameEmailTreatedAsIdenticalUser();
|
|
|
|
|
+ }}
|
|
|
/>
|
|
/>
|
|
|
<label
|
|
<label
|
|
|
className="form-label form-check-label"
|
|
className="form-label form-check-label"
|
|
|
htmlFor="bindByEmail-oidc"
|
|
htmlFor="bindByEmail-oidc"
|
|
|
- dangerouslySetInnerHTML={{ __html: t('security_settings.Treat email matching as identical') }}
|
|
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t(
|
|
|
|
|
+ 'security_settings.Treat email matching as identical',
|
|
|
|
|
+ ),
|
|
|
|
|
+ }}
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
<p className="form-text text-muted">
|
|
<p className="form-text text-muted">
|
|
|
- <small dangerouslySetInnerHTML={{ __html: t('security_settings.Treat email matching as identical_warn') }} />
|
|
|
|
|
|
|
+ <small
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t(
|
|
|
|
|
+ 'security_settings.Treat email matching as identical_warn',
|
|
|
|
|
+ ),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -453,7 +696,9 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
<button
|
|
<button
|
|
|
type="submit"
|
|
type="submit"
|
|
|
className="btn btn-primary"
|
|
className="btn btn-primary"
|
|
|
- disabled={adminOidcSecurityContainer.state.retrieveError != null}
|
|
|
|
|
|
|
+ disabled={
|
|
|
|
|
+ adminOidcSecurityContainer.state.retrieveError != null
|
|
|
|
|
+ }
|
|
|
>
|
|
>
|
|
|
{t('Update')}
|
|
{t('Update')}
|
|
|
</button>
|
|
</button>
|
|
@@ -462,30 +707,39 @@ const OidcSecurityManagementContents = (props: Props) => {
|
|
|
</form>
|
|
</form>
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
<hr />
|
|
<hr />
|
|
|
|
|
|
|
|
<div style={{ minHeight: '300px' }}>
|
|
<div style={{ minHeight: '300px' }}>
|
|
|
<h4>
|
|
<h4>
|
|
|
- <span className="material-symbols-outlined" aria-hidden="true">help</span>
|
|
|
|
|
- <a href="#collapseHelpForOidcOauth" data-bs-toggle="collapse"> {t('security_settings.OAuth.how_to.oidc')}</a>
|
|
|
|
|
|
|
+ <span className="material-symbols-outlined" aria-hidden="true">
|
|
|
|
|
+ help
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <a href="#collapseHelpForOidcOauth" data-bs-toggle="collapse">
|
|
|
|
|
+ {' '}
|
|
|
|
|
+ {t('security_settings.OAuth.how_to.oidc')}
|
|
|
|
|
+ </a>
|
|
|
</h4>
|
|
</h4>
|
|
|
<div className=" card custom-card bg-body-tertiary">
|
|
<div className=" card custom-card bg-body-tertiary">
|
|
|
<ol id="collapseHelpForOidcOauth" className="collapse mb-0">
|
|
<ol id="collapseHelpForOidcOauth" className="collapse mb-0">
|
|
|
<li>{t('security_settings.OAuth.OIDC.register_1')}</li>
|
|
<li>{t('security_settings.OAuth.OIDC.register_1')}</li>
|
|
|
- <li dangerouslySetInnerHTML={{ __html: t('security_settings.OAuth.OIDC.register_2', { url: oidcCallbackUrl }) }} />
|
|
|
|
|
|
|
+ <li
|
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
|
+ __html: t('security_settings.OAuth.OIDC.register_2', {
|
|
|
|
|
+ url: oidcCallbackUrl,
|
|
|
|
|
+ }),
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
<li>{t('security_settings.OAuth.OIDC.register_3')}</li>
|
|
<li>{t('security_settings.OAuth.OIDC.register_3')}</li>
|
|
|
</ol>
|
|
</ol>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
</>
|
|
</>
|
|
|
);
|
|
);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-const OidcSecurityManagementContentsWrapper = withUnstatedContainers(OidcSecurityManagementContents, [
|
|
|
|
|
- AdminGeneralSecurityContainer,
|
|
|
|
|
- AdminOidcSecurityContainer,
|
|
|
|
|
-]);
|
|
|
|
|
|
|
+const OidcSecurityManagementContentsWrapper = withUnstatedContainers(
|
|
|
|
|
+ OidcSecurityManagementContents,
|
|
|
|
|
+ [AdminGeneralSecurityContainer, AdminOidcSecurityContainer],
|
|
|
|
|
+);
|
|
|
|
|
|
|
|
export default OidcSecurityManagementContentsWrapper;
|
|
export default OidcSecurityManagementContentsWrapper;
|