Clean up oidc config
This commit is contained in:
parent
aa768c7fd4
commit
f495ccfa3f
@ -79,7 +79,7 @@
|
|||||||
"ohif-dicom-microscopy-extension": "^0.0.5",
|
"ohif-dicom-microscopy-extension": "^0.0.5",
|
||||||
"ohif-dicom-pdf-extension": "^0.0.6",
|
"ohif-dicom-pdf-extension": "^0.0.6",
|
||||||
"ohif-vtk-extension": "^0.0.1",
|
"ohif-vtk-extension": "^0.0.1",
|
||||||
"oidc-client": "^1.6.1",
|
"oidc-client": "1.7.x",
|
||||||
"prop-types": "^15.6.2",
|
"prop-types": "^15.6.2",
|
||||||
"react-bootstrap-modal": "^4.2.0",
|
"react-bootstrap-modal": "^4.2.0",
|
||||||
"react-dnd": "^7.0.2",
|
"react-dnd": "^7.0.2",
|
||||||
@ -91,7 +91,7 @@
|
|||||||
"react-viewerbase": "0.3.2",
|
"react-viewerbase": "0.3.2",
|
||||||
"react-vtkjs-viewport": "^0.0.7",
|
"react-vtkjs-viewport": "^0.0.7",
|
||||||
"redux": "^4.0.1",
|
"redux": "^4.0.1",
|
||||||
"redux-oidc": "^3.1.0"
|
"redux-oidc": "3.1.x"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.2.2",
|
"@babel/core": "^7.2.2",
|
||||||
|
|||||||
@ -10,9 +10,6 @@ window.config = {
|
|||||||
wadoUriRoot: 'http://127.0.0.1/pacs/wado',
|
wadoUriRoot: 'http://127.0.0.1/pacs/wado',
|
||||||
qidoRoot: 'http://127.0.0.1/pacs/dicom-web',
|
qidoRoot: 'http://127.0.0.1/pacs/dicom-web',
|
||||||
wadoRoot: 'http://127.0.0.1/pacs/dicom-web',
|
wadoRoot: 'http://127.0.0.1/pacs/dicom-web',
|
||||||
// wadoUriRoot: 'http://localhost:8899/wado',
|
|
||||||
// qidoRoot: 'http://localhost:8899/dicom-web',
|
|
||||||
// wadoRoot: 'http://localhost:8899/dicom-web',
|
|
||||||
qidoSupportsIncludeField: false,
|
qidoSupportsIncludeField: false,
|
||||||
imageRendering: 'wadors',
|
imageRendering: 'wadors',
|
||||||
thumbnailRendering: 'wadors',
|
thumbnailRendering: 'wadors',
|
||||||
@ -27,26 +24,15 @@ window.config = {
|
|||||||
},
|
},
|
||||||
oidc: [
|
oidc: [
|
||||||
{
|
{
|
||||||
authServerUrl: 'http://127.0.0.1/auth/realms/master',
|
// ~ REQUIRED
|
||||||
// It looks like we have this route hardcoded in `OHIFStandaloneViewer.js`
|
// Authorization Server URL
|
||||||
authRedirectUri: '/callback', // backup: /studylist\
|
authority: 'http://127.0.0.1/auth/realms/master',
|
||||||
// Also hardcoded?
|
client_id: 'ohif-viewer',
|
||||||
postLogoutRedirectUri: '/logout-redirect.html',
|
redirect_uri: '/callback', // `OHIFStandaloneViewer.js`
|
||||||
responseType: 'id_token',
|
response_type: 'id_token',
|
||||||
scope: 'openid',
|
scope: 'openid', // email profile openid
|
||||||
clientId: 'pacs',
|
// ~ OPTIONAL
|
||||||
|
post_logout_redirect_uri: '/logout-redirect.html',
|
||||||
},
|
},
|
||||||
// ccc.js
|
|
||||||
// {
|
|
||||||
// authRedirectUri: "http://localhost:5000/callback",
|
|
||||||
// postLogoutRedirectUri: "http://localhost:5000/logout-redirect.html",
|
|
||||||
// responseType: "id_token token",
|
|
||||||
// scope: "email profile openid",
|
|
||||||
// revokeAccessTokenOnSignout: true,
|
|
||||||
// extraQueryParams: {
|
|
||||||
// kc_idp_hint: "crowds-cure-cancer-auth0-oidc",
|
|
||||||
// client_id: "crowds-cure-cancer"
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import { loadUser, createUserManager } from 'redux-oidc'
|
|||||||
/**
|
/**
|
||||||
* Creates a userManager from oidcSettings;
|
* Creates a userManager from oidcSettings;
|
||||||
* loads the user into the provided redux store
|
* loads the user into the provided redux store
|
||||||
|
* LINK: https://github.com/IdentityModel/oidc-client-js/wiki#configuration
|
||||||
*
|
*
|
||||||
* @param {*} store
|
* @param {*} store
|
||||||
* @param {Object} oidcSettings
|
* @param {Object} oidcSettings
|
||||||
@ -19,29 +20,13 @@ export default function(store, oidcSettings) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const {
|
|
||||||
authServerUrl,
|
|
||||||
clientId,
|
|
||||||
authRedirectUri,
|
|
||||||
postLogoutRedirectUri,
|
|
||||||
responseType,
|
|
||||||
extraQueryParams,
|
|
||||||
} = oidcSettings
|
|
||||||
|
|
||||||
const settings = {
|
const settings = {
|
||||||
authority: authServerUrl,
|
...oidcSettings,
|
||||||
client_id: clientId,
|
|
||||||
redirect_uri: authRedirectUri,
|
|
||||||
silent_redirect_uri: '/silent-refresh.html',
|
silent_redirect_uri: '/silent-refresh.html',
|
||||||
post_logout_redirect_uri: postLogoutRedirectUri,
|
|
||||||
response_type: responseType,
|
|
||||||
// Note: Request must have scope 'openid' to be considered an OpenID Connect request
|
|
||||||
scope: 'email profile openid',
|
|
||||||
automaticSilentRenew: true,
|
automaticSilentRenew: true,
|
||||||
revokeAccessTokenOnSignout: true,
|
revokeAccessTokenOnSignout: true,
|
||||||
filterProtocolClaims: true,
|
filterProtocolClaims: true,
|
||||||
loadUserInfo: true,
|
loadUserInfo: true,
|
||||||
extraQueryParams: extraQueryParams,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const userManager = createUserManager(settings)
|
const userManager = createUserManager(settings)
|
||||||
|
|||||||
@ -9661,7 +9661,7 @@ ohif-vtk-extension@^0.0.1:
|
|||||||
classnames "^2.2.6"
|
classnames "^2.2.6"
|
||||||
react-vtkjs-viewport "^0.0.7"
|
react-vtkjs-viewport "^0.0.7"
|
||||||
|
|
||||||
oidc-client@^1.6.1:
|
oidc-client@1.7.x:
|
||||||
version "1.7.1"
|
version "1.7.1"
|
||||||
resolved "https://registry.yarnpkg.com/oidc-client/-/oidc-client-1.7.1.tgz#8b9d8d50fd7f878968b1cda17712c1747eef9a54"
|
resolved "https://registry.yarnpkg.com/oidc-client/-/oidc-client-1.7.1.tgz#8b9d8d50fd7f878968b1cda17712c1747eef9a54"
|
||||||
integrity sha512-qsPBQVa/BY6AmdY89erANJbfDXrX1dqu9lKgvYZzkVDzIj5mmw6wGjFeQuV2HDm4TiJA0VT5HSTWOWnXZUYu0g==
|
integrity sha512-qsPBQVa/BY6AmdY89erANJbfDXrX1dqu9lKgvYZzkVDzIj5mmw6wGjFeQuV2HDm4TiJA0VT5HSTWOWnXZUYu0g==
|
||||||
@ -11988,7 +11988,7 @@ redeyed@~2.1.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
esprima "~4.0.0"
|
esprima "~4.0.0"
|
||||||
|
|
||||||
redux-oidc@^3.1.0:
|
redux-oidc@3.1.x:
|
||||||
version "3.1.2"
|
version "3.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/redux-oidc/-/redux-oidc-3.1.2.tgz#31a771b0e05a65879626262e1e63ba70a0936ffd"
|
resolved "https://registry.yarnpkg.com/redux-oidc/-/redux-oidc-3.1.2.tgz#31a771b0e05a65879626262e1e63ba70a0936ffd"
|
||||||
integrity sha512-1kwm3SxzgUg4h1oFpPOOzofKyWJvwhVJ3BHnm/d+h29NjZ4BF3wfJbpdubnPUF0lMrl6KNOJTz8rVlkacj+f4g==
|
integrity sha512-1kwm3SxzgUg4h1oFpPOOzofKyWJvwhVJ3BHnm/d+h29NjZ4BF3wfJbpdubnPUF0lMrl6KNOJTz8rVlkacj+f4g==
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user