feat(auth): Add Authorization Code Flow and new Keycloak recipes with new video tutorials (#4234)

Co-authored-by: Alireza <ar.sedghi@gmail.com>
This commit is contained in:
IbrahimandAlireza authored and GitHub committed 2024-07-09 14:33:37 -04:00
1 parent 998302eb85
commit aefa6d94df
81 files changed
+6525 -471

No files matched your search

@@ -36,19 +36,4 @@ window.config = {
},
],
// This is an array, but we'll only use the first entry for now
oidc: [
{
// ~ REQUIRED
// Authorization Server URL
authority: 'http://127.0.0.1/auth/realms/ohif',
client_id: 'ohif-viewer',
redirect_uri: 'http://127.0.0.1/callback', // `OHIFStandaloneViewer.js`
// "Authorization Code Flow"
// Resource: https://medium.com/@darutk/diagrams-of-all-the-openid-connect-flows-6968e3990660
response_type: 'code',
scope: 'openid', // email profile openid
// ~ OPTIONAL
post_logout_redirect_uri: '/logout-redirect.html',
},
],
};
@@ -0,0 +1,35 @@
/** @type {AppTypes.Config} */
window.config = {
routerBasename: '/ohif-viewer/',
showStudyList: true,
customizationService: {
dicomUploadComponent:
'@ohif/extension-cornerstone.customizationModule.cornerstoneDicomUploadComponent',
},
extensions: [],
modes: [],
// below flag is for performance reasons, but it might not work for all servers
showWarningMessageForCrossOrigin: true,
showCPUFallbackMessage: true,
showLoadingIndicator: true,
strictZSpacingForVolumeViewport: true,
defaultDataSourceName: 'dicomweb',
dataSources: [
{
namespace: '@ohif/extension-default.dataSourcesModule.dicomweb',
sourceName: 'dicomweb',
configuration: {
friendlyName: 'Dcm4chee Server',
name: 'Dcm4chee',
wadoUriRoot: 'http://127.0.0.1/pacs',
qidoRoot: 'http://127.0.0.1/pacs',
wadoRoot: 'http://127.0.0.1/pacs',
qidoSupportsIncludeField: false,
imageRendering: 'wadors',
thumbnailRendering: 'wadors',
dicomUploadEnabled: true,
omitQuotationForMultipartRequest: true,
},
},
],
};
@@ -0,0 +1,35 @@
/** @type {AppTypes.Config} */
window.config = {
routerBasename: '/',
showStudyList: true,
customizationService: {
dicomUploadComponent:
'@ohif/extension-cornerstone.customizationModule.cornerstoneDicomUploadComponent',
},
extensions: [],
modes: [],
// below flag is for performance reasons, but it might not work for all servers
showWarningMessageForCrossOrigin: true,
showCPUFallbackMessage: true,
showLoadingIndicator: true,
strictZSpacingForVolumeViewport: true,
defaultDataSourceName: 'dicomweb',
dataSources: [
{
namespace: '@ohif/extension-default.dataSourcesModule.dicomweb',
sourceName: 'dicomweb',
configuration: {
friendlyName: 'Dcm4chee Server',
name: 'Dcm4chee',
wadoUriRoot: '/dcm4chee-arc/aets/DCM4CHEE/wado',
qidoRoot: '/dcm4chee-arc/aets/DCM4CHEE/rs',
wadoRoot: '/dcm4chee-arc/aets/DCM4CHEE/rs',
qidoSupportsIncludeField: false,
imageRendering: 'wadors',
thumbnailRendering: 'wadors',
dicomUploadEnabled: true,
omitQuotationForMultipartRequest: true,
},
},
],
};
@@ -0,0 +1,52 @@
/** @type {AppTypes.Config} */
window.config = {
routerBasename: '/ohif-viewer',
extensions: [],
modes: [],
customizationService: {},
showStudyList: true,
maxNumberOfWebWorkers: 3,
showWarningMessageForCrossOrigin: true,
showCPUFallbackMessage: true,
showLoadingIndicator: true,
strictZSpacingForVolumeViewport: true,
groupEnabledModesFirst: true,
maxNumRequests: {
interaction: 100,
thumbnail: 75,
prefetch: 25,
},
defaultDataSourceName: 'dicomweb',
dataSources: [
{
namespace: '@ohif/extension-default.dataSourcesModule.dicomweb',
sourceName: 'dicomweb',
configuration: {
friendlyName: 'Local Orthanc',
name: 'Orthanc',
wadoUriRoot: 'http://127.0.0.1/pacs',
qidoRoot: 'http://127.0.0.1/pacs',
wadoRoot: 'http://127.0.0.1/pacs',
qidoSupportsIncludeField: false,
imageRendering: 'wadors',
thumbnailRendering: 'wadors',
enableStudyLazyLoad: true,
supportsFuzzyMatching: false,
supportsWildcard: true,
staticWado: true,
singlepart: 'bulkdata,video',
// whether the data source should use retrieveBulkData to grab metadata,
// and in case of relative path, what would it be relative to, options
// are in the series level or study level (some servers like series some study)
bulkDataURI: {
enabled: true,
},
omitQuotationForMultipartRequest: true,
},
},
],
httpErrorHandler: error => {
console.warn(error.status);
console.warn('test, navigate to https://ohif.org/');
},
};
@@ -29,8 +29,8 @@ window.config = {
friendlyName: 'Orthanc Server',
name: 'Orthanc',
wadoUriRoot: '/wado',
qidoRoot: '/dicom-web',
wadoRoot: '/dicom-web',
qidoRoot: '/pacs/dicom-web',
wadoRoot: '/pacs/dicom-web',
qidoSupportsIncludeField: false,
imageRendering: 'wadors',
thumbnailRendering: 'wadors',