@openstax/ts-utils 1.38.1 → 1.38.3

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.
@@ -8,13 +8,11 @@ export type ConsentPreferences = {
8
8
  };
9
9
  };
10
10
  export type TokenUser = {
11
- id: number;
12
11
  name: string;
13
12
  uuid: string;
14
- faculty_status: string;
15
- is_admin: boolean;
16
13
  };
17
14
  export type ApiUser = TokenUser & {
15
+ id: number;
18
16
  first_name: string;
19
17
  last_name: string;
20
18
  full_name: string;
@@ -30,6 +28,8 @@ export type ApiUser = TokenUser & {
30
28
  roles: string[];
31
29
  }>;
32
30
  external_ids: string[];
31
+ faculty_status: string;
32
+ is_admin: boolean;
33
33
  is_not_gdpr_location: boolean;
34
34
  self_reported_role: string;
35
35
  signed_contract_names: string[];
@@ -18,7 +18,7 @@ export const createLaunchVerifier = ({ configSpace, fetcher }) => (configProvide
18
18
  return callback(new Error('JWT header missing iss claim'));
19
19
  }
20
20
  try {
21
- const domain = new URL(iss).host;
21
+ const domain = new URL(iss).hostname;
22
22
  const trustedDomain = await getTrustedDomain();
23
23
  if (domain !== trustedDomain && !domain.endsWith(`.${trustedDomain}`)) {
24
24
  return callback(new Error(`Untrusted JWKS domain: "${domain}"`));