@hmcts/opal-frontend-common-node 0.0.11 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/helmet/index.d.ts.map +1 -1
  2. package/helmet/index.js +3 -2
  3. package/helmet/index.js.map +1 -1
  4. package/interfaces/index.d.ts +1 -2
  5. package/interfaces/index.d.ts.map +1 -1
  6. package/interfaces/index.js +1 -2
  7. package/interfaces/index.js.map +1 -1
  8. package/interfaces/routes-config.d.ts +5 -0
  9. package/interfaces/routes-config.d.ts.map +1 -1
  10. package/interfaces/routes-config.js +5 -0
  11. package/interfaces/routes-config.js.map +1 -1
  12. package/interfaces/securityToken.d.ts +1 -2
  13. package/interfaces/securityToken.d.ts.map +1 -1
  14. package/interfaces/securityToken.js.map +1 -1
  15. package/interfaces/session-config.d.ts +0 -1
  16. package/interfaces/session-config.d.ts.map +1 -1
  17. package/interfaces/session-config.js +0 -1
  18. package/interfaces/session-config.js.map +1 -1
  19. package/package.json +4 -3
  20. package/routes/index.d.ts +1 -0
  21. package/routes/index.d.ts.map +1 -1
  22. package/routes/index.js +38 -23
  23. package/routes/index.js.map +1 -1
  24. package/session/index.d.ts +1 -2
  25. package/session/index.d.ts.map +1 -1
  26. package/session/index.js +1 -2
  27. package/session/index.js.map +1 -1
  28. package/session.d.ts +2 -2
  29. package/sso/index.d.ts +2 -2
  30. package/sso/index.d.ts.map +1 -1
  31. package/sso/index.js +2 -2
  32. package/sso/index.js.map +1 -1
  33. package/sso/sso-authenticated.d.ts +10 -0
  34. package/sso/sso-authenticated.d.ts.map +1 -1
  35. package/sso/sso-authenticated.js +17 -5
  36. package/sso/sso-authenticated.js.map +1 -1
  37. package/sso/sso-configuration.d.ts +12 -0
  38. package/sso/sso-configuration.d.ts.map +1 -0
  39. package/sso/sso-configuration.js +44 -0
  40. package/sso/sso-configuration.js.map +1 -0
  41. package/sso/sso-login-callback.d.ts +21 -3
  42. package/sso/sso-login-callback.d.ts.map +1 -1
  43. package/sso/sso-login-callback.js +72 -19
  44. package/sso/sso-login-callback.js.map +1 -1
  45. package/sso/sso-login.d.ts +17 -2
  46. package/sso/sso-login.d.ts.map +1 -1
  47. package/sso/sso-login.js +24 -17
  48. package/sso/sso-login.js.map +1 -1
  49. package/sso/sso-logout-callback.d.ts +10 -0
  50. package/sso/sso-logout-callback.d.ts.map +1 -1
  51. package/sso/sso-logout-callback.js +10 -0
  52. package/sso/sso-logout-callback.js.map +1 -1
  53. package/sso/sso-logout.d.ts +14 -3
  54. package/sso/sso-logout.d.ts.map +1 -1
  55. package/sso/sso-logout.js +19 -25
  56. package/sso/sso-logout.js.map +1 -1
  57. package/stubs/sso/sso-authenticated.stub.d.ts +11 -0
  58. package/stubs/sso/sso-authenticated.stub.d.ts.map +1 -1
  59. package/stubs/sso/sso-authenticated.stub.js +14 -6
  60. package/stubs/sso/sso-authenticated.stub.js.map +1 -1
  61. package/stubs/sso/sso-login-callback.stub.d.ts +17 -0
  62. package/stubs/sso/sso-login-callback.stub.d.ts.map +1 -1
  63. package/stubs/sso/sso-login-callback.stub.js +38 -6
  64. package/stubs/sso/sso-login-callback.stub.js.map +1 -1
  65. package/stubs/sso/sso-login.stub.d.ts +11 -0
  66. package/stubs/sso/sso-login.stub.d.ts.map +1 -1
  67. package/stubs/sso/sso-login.stub.js +17 -8
  68. package/stubs/sso/sso-login.stub.js.map +1 -1
  69. package/stubs/sso/sso-logout-callback.stub.d.ts +12 -0
  70. package/stubs/sso/sso-logout-callback.stub.d.ts.map +1 -1
  71. package/stubs/sso/sso-logout-callback.stub.js +12 -0
  72. package/stubs/sso/sso-logout-callback.stub.js.map +1 -1
  73. package/stubs/sso/sso-logout.stub.d.ts +14 -2
  74. package/stubs/sso/sso-logout.stub.d.ts.map +1 -1
  75. package/stubs/sso/sso-logout.stub.js +21 -3
  76. package/stubs/sso/sso-logout.stub.js.map +1 -1
  77. package/interfaces/userState.d.ts +0 -16
  78. package/interfaces/userState.d.ts.map +0 -1
  79. package/interfaces/userState.js +0 -16
  80. package/interfaces/userState.js.map +0 -1
  81. package/session/session-user-state/index.d.ts +0 -4
  82. package/session/session-user-state/index.d.ts.map +0 -1
  83. package/session/session-user-state/index.js +0 -20
  84. package/session/session-user-state/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helmet/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAUnC;;;;GAIG;AACH,qBAAa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAU;gBAC9B,eAAe,EAAE,OAAO;IAI7B,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;CAiC/D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helmet/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAWnC;;;;GAIG;AACH,qBAAa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAU;gBAC9B,eAAe,EAAE,OAAO;IAI7B,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;CAiC/D"}
package/helmet/index.js CHANGED
@@ -2,6 +2,7 @@ import helmet from 'helmet';
2
2
  import { Logger } from '@hmcts/nodejs-logging';
3
3
  const logger = Logger.getLogger('helmet');
4
4
  const self = "'self'";
5
+ const unsafeInline = "'unsafe-inline'";
5
6
  const dynatraceDomain = '*.dynatrace.com';
6
7
  const LaunchDarklyDomain = '*.launchdarkly.com';
7
8
  const azureDomain = '*.azure.com';
@@ -37,8 +38,8 @@ export class Helmet {
37
38
  imgSrc: [self],
38
39
  objectSrc: [self],
39
40
  scriptSrc,
40
- styleSrc: [self],
41
- scriptSrcAttr: ["'unsafe-inline'"],
41
+ styleSrc: [self, unsafeInline],
42
+ scriptSrcAttr: [unsafeInline],
42
43
  },
43
44
  },
44
45
  referrerPolicy: { policy: 'origin' },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/helmet/index.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;AAC1C,MAAM,IAAI,GAAG,QAAQ,CAAC;AACtB,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAC1C,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAChD,MAAM,WAAW,GAAG,aAAa,CAAC;AAClC,MAAM,yBAAyB,GAAG,iCAAiC,CAAC;AACpE;;;;GAIG;AACH,MAAM,OAAO,MAAM;IACA,eAAe,CAAU;IAC1C,YAAY,eAAwB;QAClC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;IAEM,SAAS,CAAC,GAAoB,EAAE,OAAgB;QACrD,IAAI,OAAO,EAAE,CAAC;YACZ,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YAC9B,mCAAmC;YACnC,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,eAAe,EAAE,uDAAuD,CAAC,CAAC;YAEnG,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;gBACzB,uFAAuF;gBACvF,yFAAyF;gBACzF,oGAAoG;gBACpG,iCAAiC;gBACjC,SAAS,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YAClC,CAAC;YAED,GAAG,CAAC,GAAG,CACL,MAAM,CAAC;gBACL,qBAAqB,EAAE;oBACrB,UAAU,EAAE;wBACV,UAAU,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,kBAAkB,EAAE,WAAW,EAAE,yBAAyB,CAAC;wBAC/F,UAAU,EAAE,CAAC,QAAQ,CAAC;wBACtB,OA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AS,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YAClC,CAAC;YAED,GAAG,CAAC,GAAG,CACL,MAAM,CAAC;gBACL,qBAAqB,EAAE;oBACrB,UAAU,EAAE;wBACV,UAAU,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,kBAAkB,EAAE,WAAW,EAAE,yBAAyB,CAAC;wBAC/F,UAAU,EAAE,CAAC,QAAQ,CAAC;wBACtB,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC;wBACxB,MAAM,EAAE,CAAC,IAAI,CAAC;wBACd,SAAS,EAAE,CAAC,IAAI,CAAC;wBACjB,SAAS;wBACT,QAAQ,EAAE,CAAC,IAAI,EAAE,YAAY,CAAC;wBAC9B,aAAa,EAAE,CAAC,YAAY,CAAC;qBAC9B;iBACF;gBACD,cAAc,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;aACrC,CAAC,CACH,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
@@ -1,4 +1,3 @@
1
- import UserState from './userState';
2
1
  import SecurityToken from './securityToken';
3
2
  import launchDarklyConfig from './launch-darkly-config';
4
3
  import appInsightsConfig from './app-insights-config';
@@ -8,5 +7,5 @@ import SessionStorageConfiguration from './session-storage-config';
8
7
  import RoutesConfiguration from './routes-config';
9
8
  import SsoConfiguration from './sso-config';
10
9
  import SessionConfiguration from './session-config';
11
- export { UserState, SecurityToken, launchDarklyConfig, appInsightsConfig, TransferServerState, ExpiryConfiguration, SessionStorageConfiguration, RoutesConfiguration, SsoConfiguration, SessionConfiguration, };
10
+ export { SecurityToken, launchDarklyConfig, appInsightsConfig, TransferServerState, ExpiryConfiguration, SessionStorageConfiguration, RoutesConfiguration, SsoConfiguration, SessionConfiguration, };
12
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,kBAAkB,MAAM,wBAAwB,CAAC;AACxD,OAAO,iBAAiB,MAAM,uBAAuB,CAAC;AACtD,OAAO,mBAAmB,MAAM,yBAAyB,CAAC;AAC1D,OAAO,mBAAmB,MAAM,yBAAyB,CAAC;AAC1D,OAAO,2BAA2B,MAAM,0BAA0B,CAAC;AACnE,OAAO,mBAAmB,MAAM,iBAAiB,CAAC;AAClD,OAAO,gBAAgB,MAAM,cAAc,CAAC;AAC5C,OAAO,oBAAoB,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EACL,SAAS,EACT,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,2BAA2B,EAC3B,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,GACrB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,kBAAkB,MAAM,wBAAwB,CAAC;AACxD,OAAO,iBAAiB,MAAM,uBAAuB,CAAC;AACtD,OAAO,mBAAmB,MAAM,yBAAyB,CAAC;AAC1D,OAAO,mBAAmB,MAAM,yBAAyB,CAAC;AAC1D,OAAO,2BAA2B,MAAM,0BAA0B,CAAC;AACnE,OAAO,mBAAmB,MAAM,iBAAiB,CAAC;AAClD,OAAO,gBAAgB,MAAM,cAAc,CAAC;AAC5C,OAAO,oBAAoB,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,2BAA2B,EAC3B,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,GACrB,CAAC"}
@@ -1,4 +1,3 @@
1
- import UserState from './userState';
2
1
  import SecurityToken from './securityToken';
3
2
  import launchDarklyConfig from './launch-darkly-config';
4
3
  import appInsightsConfig from './app-insights-config';
@@ -8,5 +7,5 @@ import SessionStorageConfiguration from './session-storage-config';
8
7
  import RoutesConfiguration from './routes-config';
9
8
  import SsoConfiguration from './sso-config';
10
9
  import SessionConfiguration from './session-config';
11
- export { UserState, SecurityToken, launchDarklyConfig, appInsightsConfig, TransferServerState, ExpiryConfiguration, SessionStorageConfiguration, RoutesConfiguration, SsoConfiguration, SessionConfiguration, };
10
+ export { SecurityToken, launchDarklyConfig, appInsightsConfig, TransferServerState, ExpiryConfiguration, SessionStorageConfiguration, RoutesConfiguration, SsoConfiguration, SessionConfiguration, };
12
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,kBAAkB,MAAM,wBAAwB,CAAC;AACxD,OAAO,iBAAiB,MAAM,uBAAuB,CAAC;AACtD,OAAO,mBAAmB,MAAM,yBAAyB,CAAC;AAC1D,OAAO,mBAAmB,MAAM,yBAAyB,CAAC;AAC1D,OAAO,2BAA2B,MAAM,0BAA0B,CAAC;AACnE,OAAO,mBAAmB,MAAM,iBAAiB,CAAC;AAClD,OAAO,gBAAgB,MAAM,cAAc,CAAC;AAC5C,OAAO,oBAAoB,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EACL,SAAS,EACT,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,2BAA2B,EAC3B,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,GACrB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,kBAAkB,MAAM,wBAAwB,CAAC;AACxD,OAAO,iBAAiB,MAAM,uBAAuB,CAAC;AACtD,OAAO,mBAAmB,MAAM,yBAAyB,CAAC;AAC1D,OAAO,mBAAmB,MAAM,yBAAyB,CAAC;AAC1D,OAAO,2BAA2B,MAAM,0BAA0B,CAAC;AACnE,OAAO,mBAAmB,MAAM,iBAAiB,CAAC;AAClD,OAAO,gBAAgB,MAAM,cAAc,CAAC;AAC5C,OAAO,oBAAoB,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,2BAA2B,EAC3B,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,GACrB,CAAC"}
@@ -1,8 +1,13 @@
1
1
  declare class RoutesConfiguration {
2
2
  opalApiTarget: string;
3
3
  opalFinesServiceTarget: string;
4
+ opalUserServiceTarget: string;
4
5
  frontendHostname: string;
5
6
  prefix: string;
7
+ clientId: string;
8
+ clientSecret: string;
9
+ tenantId: string;
10
+ microsoftUrl: string;
6
11
  }
7
12
  export default RoutesConfiguration;
8
13
  //# sourceMappingURL=routes-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"routes-config.d.ts","sourceRoot":"","sources":["../../src/interfaces/routes-config.ts"],"names":[],"mappings":"AAAA,cAAM,mBAAmB;IACvB,aAAa,EAAG,MAAM,CAAC;IACvB,sBAAsB,EAAG,MAAM,CAAC;IAChC,gBAAgB,EAAG,MAAM,CAAC;IAC1B,MAAM,EAAG,MAAM,CAAC;CACjB;AAED,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"routes-config.d.ts","sourceRoot":"","sources":["../../src/interfaces/routes-config.ts"],"names":[],"mappings":"AAAA,cAAM,mBAAmB;IACvB,aAAa,EAAG,MAAM,CAAC;IACvB,sBAAsB,EAAG,MAAM,CAAC;IAChC,qBAAqB,EAAG,MAAM,CAAC;IAC/B,gBAAgB,EAAG,MAAM,CAAC;IAC1B,MAAM,EAAG,MAAM,CAAC;IAChB,QAAQ,EAAG,MAAM,CAAC;IAClB,YAAY,EAAG,MAAM,CAAC;IACtB,QAAQ,EAAG,MAAM,CAAC;IAClB,YAAY,EAAG,MAAM,CAAC;CACvB;AAED,eAAe,mBAAmB,CAAC"}
@@ -1,8 +1,13 @@
1
1
  class RoutesConfiguration {
2
2
  opalApiTarget;
3
3
  opalFinesServiceTarget;
4
+ opalUserServiceTarget;
4
5
  frontendHostname;
5
6
  prefix;
7
+ clientId;
8
+ clientSecret;
9
+ tenantId;
10
+ microsoftUrl;
6
11
  }
7
12
  export default RoutesConfiguration;
8
13
  //# sourceMappingURL=routes-config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"routes-config.js","sourceRoot":"","sources":["../../src/interfaces/routes-config.ts"],"names":[],"mappings":"AAAA,MAAM,mBAAmB;IACvB,aAAa,CAAU;IACvB,sBAAsB,CAAU;IAChC,gBAAgB,CAAU;IAC1B,MAAM,CAAU;CACjB;AAED,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"routes-config.js","sourceRoot":"","sources":["../../src/interfaces/routes-config.ts"],"names":[],"mappings":"AAAA,MAAM,mBAAmB;IACvB,aAAa,CAAU;IACvB,sBAAsB,CAAU;IAChC,qBAAqB,CAAU;IAC/B,gBAAgB,CAAU;IAC1B,MAAM,CAAU;IAChB,QAAQ,CAAU;IAClB,YAAY,CAAU;IACtB,QAAQ,CAAU;IAClB,YAAY,CAAU;CACvB;AAED,eAAe,mBAAmB,CAAC"}
@@ -1,6 +1,5 @@
1
- import UserState from './userState';
2
1
  declare class SecurityToken {
3
- user_state: UserState | undefined;
2
+ user_state: undefined;
4
3
  access_token: string;
5
4
  }
6
5
  export default SecurityToken;
@@ -1 +1 @@
1
- {"version":3,"file":"securityToken.d.ts","sourceRoot":"","sources":["../../src/interfaces/securityToken.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,cAAM,aAAa;IACjB,UAAU,EAAE,SAAS,GAAG,SAAS,CAAC;IAClC,YAAY,EAAG,MAAM,CAAC;CACvB;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"securityToken.d.ts","sourceRoot":"","sources":["../../src/interfaces/securityToken.ts"],"names":[],"mappings":"AAAA,cAAM,aAAa;IACjB,UAAU,EAAE,SAAS,CAAC;IACtB,YAAY,EAAG,MAAM,CAAC;CACvB;AAED,eAAe,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"securityToken.js","sourceRoot":"","sources":["../../src/interfaces/securityToken.ts"],"names":[],"mappings":"AAEA,MAAM,aAAa;IACjB,UAAU,CAAwB;IAClC,YAAY,CAAU;CACvB;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"securityToken.js","sourceRoot":"","sources":["../../src/interfaces/securityToken.ts"],"names":[],"mappings":"AAAA,MAAM,aAAa;IACjB,UAAU,CAAY;IACtB,YAAY,CAAU;CACvB;AAED,eAAe,aAAa,CAAC"}
@@ -1,5 +1,4 @@
1
1
  declare class SessionConfiguration {
2
- userStateUrl: string;
3
2
  sessionExpiryUrl: string;
4
3
  }
5
4
  export default SessionConfiguration;
@@ -1 +1 @@
1
- {"version":3,"file":"session-config.d.ts","sourceRoot":"","sources":["../../src/interfaces/session-config.ts"],"names":[],"mappings":"AAAA,cAAM,oBAAoB;IACxB,YAAY,EAAG,MAAM,CAAC;IACtB,gBAAgB,EAAG,MAAM,CAAC;CAC3B;AACD,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"session-config.d.ts","sourceRoot":"","sources":["../../src/interfaces/session-config.ts"],"names":[],"mappings":"AAAA,cAAM,oBAAoB;IACxB,gBAAgB,EAAG,MAAM,CAAC;CAC3B;AACD,eAAe,oBAAoB,CAAC"}
@@ -1,5 +1,4 @@
1
1
  class SessionConfiguration {
2
- userStateUrl;
3
2
  sessionExpiryUrl;
4
3
  }
5
4
  export default SessionConfiguration;
@@ -1 +1 @@
1
- {"version":3,"file":"session-config.js","sourceRoot":"","sources":["../../src/interfaces/session-config.ts"],"names":[],"mappings":"AAAA,MAAM,oBAAoB;IACxB,YAAY,CAAU;IACtB,gBAAgB,CAAU;CAC3B;AACD,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"session-config.js","sourceRoot":"","sources":["../../src/interfaces/session-config.ts"],"names":[],"mappings":"AAAA,MAAM,oBAAoB;IACxB,gBAAgB,CAAU;CAC3B;AACD,eAAe,oBAAoB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hmcts/opal-frontend-common-node",
3
3
  "type": "module",
4
- "version": "0.0.11",
4
+ "version": "0.0.13",
5
5
  "license": "MIT",
6
6
  "description": "Common nodejs library components for opal",
7
7
  "main": "dist/index",
@@ -16,6 +16,7 @@
16
16
  "audit:check": "yarn audit --recursive --environment production --json > yarn-known-issues-current || true && jq -s '[.[] | select(.type==\"auditAdvisory\") | .data.advisory.id] | sort' yarn-known-issues-current > current-ids.json && jq -s '[.[] | select(.type==\"auditAdvisory\") | .data.advisory.id] | sort' yarn-known-issues > known-ids.json && diff -q known-ids.json current-ids.json || (echo '❌ New vulnerabilities detected. Please review.' && exit 1)"
17
17
  },
18
18
  "dependencies": {
19
+ "@azure/msal-browser": "^4.11.0",
19
20
  "@hmcts/info-provider": "^1.1.0",
20
21
  "@hmcts/nodejs-healthcheck": "^1.8.5",
21
22
  "@hmcts/nodejs-logging": "^4.0.4",
@@ -44,8 +45,8 @@
44
45
  "@types/luxon": "^3.4.2",
45
46
  "@types/node": "^22.0.0",
46
47
  "@types/session-file-store": "^1.2.5",
47
- "@typescript-eslint/eslint-plugin": "8.38.0",
48
- "@typescript-eslint/parser": "8.38.0",
48
+ "@typescript-eslint/eslint-plugin": "8.44.0",
49
+ "@typescript-eslint/parser": "8.44.0",
49
50
  "eslint": "^9.0.0",
50
51
  "eslint-plugin-prettier": "^5.2.6",
51
52
  "typescript": "~5.9.0",
package/routes/index.d.ts CHANGED
@@ -5,6 +5,7 @@ import SsoConfiguration from '@hmcts/opal-frontend-common-node/interfaces/sso-co
5
5
  import SessionConfiguration from '@hmcts/opal-frontend-common-node/interfaces/session-config';
6
6
  export declare class Routes {
7
7
  private setupSSORoutes;
8
+ private setupStubRoutes;
8
9
  enableFor(app: Application, ssoEnabled: boolean, expiryConfiguration: ExpiryConfiguration, routesConfiguration: RoutesConfiguration, sessionConfiguration: SessionConfiguration, ssoConfiguration: SsoConfiguration): void;
9
10
  }
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAatC,OAAO,mBAAmB,MAAM,mEAAmE,CAAC;AACpG,OAAO,mBAAmB,MAAM,2DAA2D,CAAC;AAC5F,OAAO,gBAAgB,MAAM,wDAAwD,CAAC;AACtF,OAAO,oBAAoB,MAAM,4DAA4D,CAAC;AAE9F,qBAAa,MAAM;IACjB,OAAO,CAAC,cAAc;IAuCf,SAAS,CACd,GAAG,EAAE,WAAW,EAChB,UAAU,EAAE,OAAO,EACnB,mBAAmB,EAAE,mBAAmB,EACxC,mBAAmB,EAAE,mBAAmB,EACxC,oBAAoB,EAAE,oBAAoB,EAC1C,gBAAgB,EAAE,gBAAgB,GACjC,IAAI;CAyBR"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAQtC,OAAO,mBAAmB,MAAM,mEAAmE,CAAC;AACpG,OAAO,mBAAmB,MAAM,2DAA2D,CAAC;AAC5F,OAAO,gBAAgB,MAAM,wDAAwD,CAAC;AACtF,OAAO,oBAAoB,MAAM,4DAA4D,CAAC;AAG9F,qBAAa,MAAM;IACjB,OAAO,CAAC,cAAc;IAoDtB,OAAO,CAAC,eAAe;IA2BhB,SAAS,CACd,GAAG,EAAE,WAAW,EAChB,UAAU,EAAE,OAAO,EACnB,mBAAmB,EAAE,mBAAmB,EACxC,mBAAmB,EAAE,mBAAmB,EACxC,oBAAoB,EAAE,oBAAoB,EAC1C,gBAAgB,EAAE,gBAAgB,GACjC,IAAI;CAqBR"}
package/routes/index.js CHANGED
@@ -1,35 +1,50 @@
1
1
  import bodyParser from 'body-parser';
2
- import { ssoAuthenticated, ssoLoginCallback, ssoLogin, ssoLogout, ssoLogoutCallback } from '../sso';
3
- import { ssoLoginStub, ssoLoginCallbackStub, ssoAuthenticatedStub, ssoLogoutStub, ssoLogoutCallbackStub, } from '../stubs/sso';
2
+ import { ssoAuthenticated, ssoLogin, ssoLoginCallback } from '../sso';
3
+ import createMsalInstance from '../sso/sso-configuration';
4
+ import ssoLogout from '../sso/sso-logout';
5
+ import { ssoAuthenticatedStub, ssoLogoutCallbackStub, ssoLoginStub, ssoLoginCallbackStub } from '../stubs/sso';
4
6
  import sessionExpiry from '@hmcts/opal-frontend-common-node/session/session-expiry';
5
- import sessionUserState from '@hmcts/opal-frontend-common-node/session/session-user-state';
7
+ import ssoLogoutCallback from '../sso/sso-logout-callback';
6
8
  export class Routes {
7
- setupSSORoutes(app, ssoEnabled, opalApiUrl, frontendHostname, prefix, ssoConfiguration) {
8
- const login = ssoEnabled ? ssoLogin : ssoLoginStub;
9
- const loginCallback = ssoEnabled ? ssoLoginCallback : ssoLoginCallbackStub;
10
- const logout = ssoEnabled ? ssoLogout : ssoLogoutStub;
11
- const logoutCallback = ssoEnabled ? ssoLogoutCallback : ssoLogoutCallbackStub;
12
- const authenticated = ssoEnabled ? ssoAuthenticated : ssoAuthenticatedStub;
13
- const loginCallbackType = ssoEnabled ? 'post' : 'get';
14
- app.get(ssoConfiguration.login, (req, res, next) => login(req, res, next, opalApiUrl, frontendHostname));
15
- const routePath = ssoConfiguration.loginCallback;
16
- const callbackHandler = (req, res, next) => loginCallback(req, res, next, opalApiUrl);
17
- if (loginCallbackType === 'post') {
18
- app.post(routePath, callbackHandler);
9
+ setupSSORoutes(app, ssoConfiguration, routesConfiguration) {
10
+ if (!routesConfiguration.clientId || !routesConfiguration.clientSecret || !routesConfiguration.tenantId) {
11
+ throw new Error('Missing essential SSO configuration fields: clientId, clientSecret, or tenantId');
19
12
  }
20
- else {
21
- app.get(routePath, callbackHandler);
22
- }
23
- app.get(ssoConfiguration.logout, (req, res, next) => logout(req, res, next, opalApiUrl, frontendHostname));
24
- app.get(ssoConfiguration.logoutCallback, (req, res, next) => logoutCallback(req, res, next, prefix));
25
- app.get(ssoConfiguration.authenticated, (req, res) => authenticated(req, res));
13
+ // SSO CONFIGURATION
14
+ const confidentialClient = createMsalInstance(routesConfiguration.clientId, routesConfiguration.clientSecret, routesConfiguration.tenantId, routesConfiguration.microsoftUrl);
15
+ // LOGIN
16
+ app.get(ssoConfiguration.login, (req, res, next) => ssoLogin(res, next, confidentialClient, routesConfiguration.frontendHostname, ssoConfiguration.loginCallback));
17
+ // LOGIN CALLBACK
18
+ app.post(ssoConfiguration.loginCallback, (req, res) => ssoLoginCallback(req, res, confidentialClient, routesConfiguration.clientId, routesConfiguration.frontendHostname, ssoConfiguration.loginCallback));
19
+ // LOGOUT
20
+ app.get(ssoConfiguration.logout, (req, res) => ssoLogout(res, `${routesConfiguration.microsoftUrl}${routesConfiguration.tenantId}`, `${routesConfiguration.frontendHostname}${ssoConfiguration.logoutCallback}`));
21
+ // LOGOUT CALLBACK
22
+ app.get(ssoConfiguration.logoutCallback, (req, res, next) => ssoLogoutCallback(req, res, next, routesConfiguration.prefix));
23
+ // AUTHENTICATED
24
+ app.get(ssoConfiguration.authenticated, (req, res) => ssoAuthenticated(req, res));
25
+ }
26
+ setupStubRoutes(app, ssoConfiguration, routesConfiguration) {
27
+ // LOGIN
28
+ app.get(ssoConfiguration.login, (req, res, next) => ssoLoginStub(req, res, next));
29
+ // LOGIN CALLBACK
30
+ app.get(ssoConfiguration.loginCallback, (req, res, next) => ssoLoginCallbackStub(req, res, next, routesConfiguration.opalApiTarget));
31
+ // LOGOUT
32
+ app.get(ssoConfiguration.logout, (req, res, next) => ssoLogoutCallbackStub(req, res, next, routesConfiguration.prefix));
33
+ // LOGOUT CALLBACK
34
+ app.get(ssoConfiguration.logoutCallback, (req, res, next) => ssoLogoutCallbackStub(req, res, next, routesConfiguration.prefix));
35
+ // AUTHENTICATED
36
+ app.get(ssoConfiguration.authenticated, (req, res) => ssoAuthenticatedStub(req, res));
26
37
  }
27
38
  enableFor(app, ssoEnabled, expiryConfiguration, routesConfiguration, sessionConfiguration, ssoConfiguration) {
28
39
  // Declare use of body-parser AFTER the use of proxy https://github.com/villadora/express-http-proxy
29
40
  app.use(bodyParser.json());
30
41
  app.use(bodyParser.urlencoded({ extended: false }));
31
- this.setupSSORoutes(app, ssoEnabled, routesConfiguration.opalApiTarget, routesConfiguration.frontendHostname, routesConfiguration.prefix, ssoConfiguration);
32
- app.get(sessionConfiguration.userStateUrl, (req, res) => sessionUserState(req, res));
42
+ if (ssoEnabled) {
43
+ this.setupSSORoutes(app, ssoConfiguration, routesConfiguration);
44
+ }
45
+ else {
46
+ this.setupStubRoutes(app, ssoConfiguration, routesConfiguration);
47
+ }
33
48
  app.get(sessionConfiguration.sessionExpiryUrl, (req, res) => sessionExpiry(req, res, expiryConfiguration.testMode, expiryConfiguration.expiryTimeInMilliseconds, expiryConfiguration.warningThresholdInMilliseconds));
34
49
  }
35
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":"AACA,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AACpG,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EACpB,aAAa,EACb,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,OAAO,aAAa,MAAM,yDAAyD,CAAC;AACpF,OAAO,gBAAgB,MAAM,6DAA6D,CAAC;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C,GAAG,EAAE,gBAAgB,EAAE,mBAAmB,CAAC,CAAC;QACnE,CAAC;QAED,GAAG,CAAC,GAAG,CAAC,oBAAoB,CAAC,gBAAgB,EAAE,CAAC,GAAY,EAAE,GAAa,EAAE,EAAE,CAC7E,aAAa,CACX,GAAG,EACH,GAAG,EACH,mBAAmB,CAAC,QAAQ,EAC5B,mBAAmB,CAAC,wBAAwB,EAC5C,mBAAmB,CAAC,8BAA8B,CACnD,CACF,CAAC;IACJ,CAAC;CACF"}
@@ -1,5 +1,4 @@
1
1
  import SessionStorage from './session-storage';
2
2
  import sessionExpiry from './session-expiry';
3
- import sessionUserState from './session-user-state';
4
- export { SessionStorage, sessionUserState, sessionExpiry };
3
+ export { SessionStorage, sessionExpiry };
5
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC"}
package/session/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import SessionStorage from './session-storage';
2
2
  import sessionExpiry from './session-expiry';
3
- import sessionUserState from './session-user-state';
4
- export { SessionStorage, sessionUserState, sessionExpiry };
3
+ export { SessionStorage, sessionExpiry };
5
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC"}
package/session.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { SecurityToken, UserState } from './interfaces/index';
1
+ import { SecurityToken } from './interfaces/index';
2
2
 
3
3
  declare module 'express-session' {
4
4
  interface SessionData {
5
- user_state: UserState | undefined;
5
+ user_state: undefined;
6
6
  securityToken: SecurityToken | undefined;
7
7
  }
8
8
  }
package/sso/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import ssoLogin from './sso-login';
2
2
  import ssoLogout from './sso-logout';
3
3
  import ssoLoginCallback from './sso-login-callback';
4
- import ssoLogoutCallback from './sso-logout-callback';
5
4
  import ssoAuthenticated from './sso-authenticated';
6
- export { ssoLogin, ssoLoginCallback, ssoLogout, ssoAuthenticated, ssoLogoutCallback };
5
+ import ssoConfig from './sso-configuration';
6
+ export { ssoLogin, ssoLoginCallback, ssoLogout, ssoAuthenticated, ssoConfig };
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sso/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AACpD,OAAO,iBAAiB,MAAM,uBAAuB,CAAC;AACtD,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sso/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AACpD,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,CAAC"}
package/sso/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import ssoLogin from './sso-login';
2
2
  import ssoLogout from './sso-logout';
3
3
  import ssoLoginCallback from './sso-login-callback';
4
- import ssoLogoutCallback from './sso-logout-callback';
5
4
  import ssoAuthenticated from './sso-authenticated';
6
- export { ssoLogin, ssoLoginCallback, ssoLogout, ssoAuthenticated, ssoLogoutCallback };
5
+ import ssoConfig from './sso-configuration';
6
+ export { ssoLogin, ssoLoginCallback, ssoLogout, ssoAuthenticated, ssoConfig };
7
7
  //# sourceMappingURL=index.js.map
package/sso/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sso/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AACpD,OAAO,iBAAiB,MAAM,uBAAuB,CAAC;AACtD,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sso/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AACpD,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,CAAC"}
@@ -1,4 +1,14 @@
1
1
  import { Request, Response } from 'express';
2
+ /**
3
+ * Express middleware to check if the user is authenticated via SSO.
4
+ *
5
+ * Sets appropriate cache control headers to prevent caching of sensitive authentication responses.
6
+ * Reads the access token from the session and checks if it is present and not expired.
7
+ * Responds with HTTP 401 and `false` if the token is missing or expired, otherwise responds with HTTP 200 and `true`.
8
+ *
9
+ * @param req - Express request object, expected to have a session with a securityToken containing an access_token.
10
+ * @param res - Express response object used to send the authentication status.
11
+ */
2
12
  declare const _default: (req: Request, res: Response) => void;
3
13
  export default _default;
4
14
  //# sourceMappingURL=sso-authenticated.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sso-authenticated.d.ts","sourceRoot":"","sources":["../../src/sso/sso-authenticated.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;yBAG5B,KAAK,OAAO,EAAE,KAAK,QAAQ;AAA3C,wBAWE"}
1
+ {"version":3,"file":"sso-authenticated.d.ts","sourceRoot":"","sources":["../../src/sso/sso-authenticated.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAG5C;;;;;;;;;GASG;yBACa,KAAK,OAAO,EAAE,KAAK,QAAQ;AAA3C,wBAcE"}
@@ -1,10 +1,22 @@
1
1
  import { Jwt } from '../utils';
2
+ /**
3
+ * Express middleware to check if the user is authenticated via SSO.
4
+ *
5
+ * Sets appropriate cache control headers to prevent caching of sensitive authentication responses.
6
+ * Reads the access token from the session and checks if it is present and not expired.
7
+ * Responds with HTTP 401 and `false` if the token is missing or expired, otherwise responds with HTTP 200 and `true`.
8
+ *
9
+ * @param req - Express request object, expected to have a session with a securityToken containing an access_token.
10
+ * @param res - Express response object used to send the authentication status.
11
+ */
2
12
  export default (req, res) => {
3
- const isJwtExpired = Jwt.isJwtExpired(req.session.securityToken?.access_token);
4
- const userId = req.session.securityToken?.user_state?.user_id;
5
- // Don't allow caching of this endpoint
6
- res.header('Cache-Control', 'no-store, must-revalidate');
7
- if (isJwtExpired || !userId) {
13
+ res.set('Cache-Control', 'no-store, no-cache, private');
14
+ res.set('Pragma', 'no-cache');
15
+ // Read the access token from the session (set during the SSO login callback).
16
+ const accessToken = req.session.securityToken?.access_token;
17
+ // Validate expiry without decoding secrets; returns true when token is missing or expired.
18
+ const isJwtExpired = Jwt.isJwtExpired(accessToken);
19
+ if (!accessToken || isJwtExpired) {
8
20
  res.status(401).send(false);
9
21
  }
10
22
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"sso-authenticated.js","sourceRoot":"","sources":["../../src/sso/sso-authenticated.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,eAAe,CAAC,GAAY,EAAE,GAAa,EAAE,EAAE;IAC7C,MAAM,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;IAC/E,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,UAAU,EAAE,OAAO,CAAC;IAC9D,uCAAuC;IACvC,GAAG,CAAC,MAAM,CAAC,eAAe,EAAE,2BAA2B,CAAC,CAAC;IAEzD,IAAI,YAAY,IAAI,CAAC,MAAM,EAAE,CAAC;QAC5B,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;SAAM,CAAC;QACN,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"sso-authenticated.js","sourceRoot":"","sources":["../../src/sso/sso-authenticated.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B;;;;;;;;;GASG;AACH,eAAe,CAAC,GAAY,EAAE,GAAa,EAAE,EAAE;IAC7C,GAAG,CAAC,GAAG,CAAC,eAAe,EAAE,6BAA6B,CAAC,CAAC;IACxD,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAE9B,8EAA8E;IAC9E,MAAM,WAAW,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,YAAY,CAAC;IAC5D,2FAA2F;IAC3F,MAAM,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;IAEnD,IAAI,CAAC,WAAW,IAAI,YAAY,EAAE,CAAC;QACjC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;SAAM,CAAC;QACN,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { ConfidentialClientApplication } from '@azure/msal-node';
2
+ /**
3
+ * Creates and configures a new instance of `ConfidentialClientApplication` for Microsoft SSO authentication.
4
+ *
5
+ * @param clientId - The client (application) ID registered in Azure AD.
6
+ * @param clientSecret - The client secret associated with the application.
7
+ * @param tenantId - The Azure AD tenant ID.
8
+ * @param microsoftUrl - The base Microsoft authority URL (e.g., "https://login.microsoftonline.com/").
9
+ * @returns A configured `ConfidentialClientApplication` instance for use with MSAL.
10
+ */
11
+ export default function ssoConfig(clientId: string, clientSecret: string, tenantId: string, microsoftUrl: string): ConfidentialClientApplication;
12
+ //# sourceMappingURL=sso-configuration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sso-configuration.d.ts","sourceRoot":"","sources":["../../src/sso/sso-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAA2B,MAAM,kBAAkB,CAAC;AAG1F;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,GACnB,6BAA6B,CAiC/B"}
@@ -0,0 +1,44 @@
1
+ import { ConfidentialClientApplication, LogLevel } from '@azure/msal-node';
2
+ import { Logger } from '@hmcts/nodejs-logging';
3
+ /**
4
+ * Creates and configures a new instance of `ConfidentialClientApplication` for Microsoft SSO authentication.
5
+ *
6
+ * @param clientId - The client (application) ID registered in Azure AD.
7
+ * @param clientSecret - The client secret associated with the application.
8
+ * @param tenantId - The Azure AD tenant ID.
9
+ * @param microsoftUrl - The base Microsoft authority URL (e.g., "https://login.microsoftonline.com/").
10
+ * @returns A configured `ConfidentialClientApplication` instance for use with MSAL.
11
+ */
12
+ export default function ssoConfig(clientId, clientSecret, tenantId, microsoftUrl) {
13
+ const logger = Logger.getLogger('sso-msal-configuration');
14
+ const msalConfig = {
15
+ auth: {
16
+ clientId,
17
+ authority: microsoftUrl + tenantId,
18
+ clientSecret,
19
+ },
20
+ system: {
21
+ loggerOptions: {
22
+ loggerCallback(logLevel, message, containsPii) {
23
+ if (containsPii) {
24
+ return;
25
+ }
26
+ switch (logLevel) {
27
+ case LogLevel.Error:
28
+ logger.error('Error on SSO Configuration:', message);
29
+ break;
30
+ case LogLevel.Warning:
31
+ case LogLevel.Info:
32
+ case LogLevel.Verbose:
33
+ default:
34
+ break;
35
+ }
36
+ },
37
+ piiLoggingEnabled: false,
38
+ logLevel: LogLevel.Verbose,
39
+ },
40
+ },
41
+ };
42
+ return new ConfidentialClientApplication(msalConfig);
43
+ }
44
+ //# sourceMappingURL=sso-configuration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sso-configuration.js","sourceRoot":"","sources":["../../src/sso/sso-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAiB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC1F,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,QAAgB,EAChB,YAAoB,EACpB,QAAgB,EAChB,YAAoB;IAEpB,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC;IAC1D,MAAM,UAAU,GAAkB;QAChC,IAAI,EAAE;YACJ,QAAQ;YACR,SAAS,EAAE,YAAY,GAAG,QAAQ;YAClC,YAAY;SACb;QACD,MAAM,EAAE;YACN,aAAa,EAAE;gBACb,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,WAAW;oBAC3C,IAAI,WAAW,EAAE,CAAC;wBAChB,OAAO;oBACT,CAAC;oBAED,QAAQ,QAAQ,EAAE,CAAC;wBACjB,KAAK,QAAQ,CAAC,KAAK;4BACjB,MAAM,CAAC,KAAK,CAAC,6BAA6B,EAAE,OAAO,CAAC,CAAC;4BACrD,MAAM;wBACR,KAAK,QAAQ,CAAC,OAAO,CAAC;wBACtB,KAAK,QAAQ,CAAC,IAAI,CAAC;wBACnB,KAAK,QAAQ,CAAC,OAAO,CAAC;wBACtB;4BACE,MAAM;oBACV,CAAC;gBACH,CAAC;gBACD,iBAAiB,EAAE,KAAK;gBACxB,QAAQ,EAAE,QAAQ,CAAC,OAAO;aAC3B;SACF;KACF,CAAC;IAEF,OAAO,IAAI,6BAA6B,CAAC,UAAU,CAAC,CAAC;AACvD,CAAC"}
@@ -1,4 +1,22 @@
1
- import { NextFunction, Request, Response } from 'express';
2
- declare const _default: (req: Request, res: Response, next: NextFunction, opalApiUrl: string) => Promise<void>;
3
- export default _default;
1
+ import { Request, Response } from 'express';
2
+ import { ConfidentialClientApplication } from '@azure/msal-node';
3
+ import 'express-session';
4
+ /**
5
+ * Handles the SSO login callback by exchanging the authorization code for tokens using MSAL,
6
+ * storing the access token in the session, and redirecting the user to the frontend.
7
+ *
8
+ * @param req - The Express request object, expected to contain the authorization code in the body.
9
+ * @param res - The Express response object, used to send responses or perform redirects.
10
+ * @param msalInstance - An instance of MSAL ConfidentialClientApplication used to acquire tokens.
11
+ * @param clientId - The client ID of the application, used to build the token request scope.
12
+ * @param frontendHostname - The base URL of the frontend application, used for redirect URIs.
13
+ * @param ssoLoginCallback - The path of the SSO login callback, appended to the frontend hostname for redirect URI.
14
+ * @returns A promise that resolves when the callback handling is complete.
15
+ *
16
+ * @remarks
17
+ * - If the authorization code is missing, responds with HTTP 400.
18
+ * - On successful token acquisition, stores the access token in the session and redirects to the frontend.
19
+ * - On error, logs the error and responds with HTTP 500.
20
+ */
21
+ export default function ssoLoginCallbackHandler(req: Request, res: Response, msalInstance: ConfidentialClientApplication, clientId: string, frontendHostname: string, ssoLoginCallback: string): Promise<void>;
4
22
  //# sourceMappingURL=sso-login-callback.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sso-login-callback.d.ts","sourceRoot":"","sources":["../../src/sso/sso-login-callback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;yBAIpC,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,EAAE,YAAY,MAAM;AAAzF,wBAyBE"}
1
+ {"version":3,"file":"sso-login-callback.d.ts","sourceRoot":"","sources":["../../src/sso/sso-login-callback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,iBAAiB,CAAC;AAOzB;;;;;;;;;;;;;;;;GAgBG;AACH,wBAA8B,uBAAuB,CACnD,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,QAAQ,EACb,YAAY,EAAE,6BAA6B,EAC3C,QAAQ,EAAE,MAAM,EAChB,gBAAgB,EAAE,MAAM,EACxB,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,IAAI,CAAC,CA6Df"}