@idp.global/catalog 3.6.0 → 4.0.0

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.
@@ -130,7 +130,7 @@ export interface IIdpAdminGaAppConfigureEventDetail {
130
130
  redirectUris: string[];
131
131
  postLogoutRedirectUris: string[];
132
132
  allowedScopes: string[];
133
- grantTypes: Array<'authorization_code' | 'client_credentials' | 'refresh_token'>;
133
+ grantTypes: Array<'authorization_code' | 'refresh_token'>;
134
134
  oidcSettings: {
135
135
  accessTokenLifetime: number;
136
136
  idTokenLifetime: number;
@@ -1734,10 +1734,10 @@ export class IdpAdminShell extends DeesElement {
1734
1734
  const postLogoutRedirectUris = this.parseLines(this.dialogPostLogoutRedirectUris);
1735
1735
  const allowedScopes = this.parseCsv(this.dialogAllowedScopes);
1736
1736
  const configuredGrantTypes = this.parseCsv(this.dialogGrantTypes);
1737
- const supportedGrantTypes = ['authorization_code', 'client_credentials', 'refresh_token'];
1737
+ const supportedGrantTypes = ['authorization_code', 'refresh_token'];
1738
1738
  const invalidGrantTypes = configuredGrantTypes.filter((grantArg) => !supportedGrantTypes.includes(grantArg));
1739
1739
  const grantTypes = configuredGrantTypes
1740
- .filter((grantArg): grantArg is 'authorization_code' | 'client_credentials' | 'refresh_token' => supportedGrantTypes.includes(grantArg));
1740
+ .filter((grantArg): grantArg is 'authorization_code' | 'refresh_token' => supportedGrantTypes.includes(grantArg));
1741
1741
  const invalidUris = [...redirectUris, ...postLogoutRedirectUris].filter((uriArg) => !this.isValidExactUri(uriArg));
1742
1742
  const lifetimesAreValid = [this.dialogAccessTokenLifetime, this.dialogIdTokenLifetime]
1743
1743
  .every((lifetimeArg) => Number.isInteger(lifetimeArg) && lifetimeArg >= 300 && lifetimeArg <= 86400)
@@ -1764,10 +1764,6 @@ export class IdpAdminShell extends DeesElement {
1764
1764
  this.dialogError = 'The refresh_token grant requires the authorization_code grant.';
1765
1765
  return;
1766
1766
  }
1767
- if (this.dialogClientType === 'public' && grantTypes.includes('client_credentials')) {
1768
- this.dialogError = 'Public clients cannot use the client_credentials grant.';
1769
- return;
1770
- }
1771
1767
  if (!lifetimesAreValid) {
1772
1768
  this.dialogError = 'Access and ID token lifetimes must be 300 to 86400 seconds; refresh family lifetime must be 3600 to 7776000 seconds.';
1773
1769
  return;
@@ -2034,7 +2030,7 @@ export class IdpAdminShell extends DeesElement {
2034
2030
  ${this.renderFormRow('Callback URIs', 'One exact absolute URI per line; required for authorization_code.', html`<textarea class="textarea" .value=${this.dialogRedirectUris} @input=${(eventArg: Event) => { this.dialogRedirectUris = (eventArg.target as HTMLTextAreaElement).value; }}></textarea>`)}
2035
2031
  ${this.renderFormRow('Post-logout URIs', 'One exact RP-Initiated Logout destination per line.', html`<textarea class="textarea" .value=${this.dialogPostLogoutRedirectUris} @input=${(eventArg: Event) => { this.dialogPostLogoutRedirectUris = (eventArg.target as HTMLTextAreaElement).value; }}></textarea>`)}
2036
2032
  ${this.renderFormRow('Allowed scopes', 'Comma-separated scopes; authorization_code requires openid.', html`<input class="input" .value=${this.dialogAllowedScopes} @input=${(eventArg: Event) => { this.dialogAllowedScopes = (eventArg.target as HTMLInputElement).value; }} />`, true)}
2037
- ${this.renderFormRow('Grant types', 'authorization_code, client_credentials, and refresh_token are supported.', html`<input class="input" .value=${this.dialogGrantTypes} @input=${(eventArg: Event) => { this.dialogGrantTypes = (eventArg.target as HTMLInputElement).value; }} />`, true)}
2033
+ ${this.renderFormRow('Grant types', 'authorization_code and refresh_token are supported.', html`<input class="input" .value=${this.dialogGrantTypes} @input=${(eventArg: Event) => { this.dialogGrantTypes = (eventArg.target as HTMLInputElement).value; }} />`, true)}
2038
2034
  <div class="mapping-row">
2039
2035
  <div>${this.renderFormRow('Access token seconds', '300 to 86400.', html`<input class="input" type="number" .value=${String(this.dialogAccessTokenLifetime)} @input=${(eventArg: Event) => this.setDialogNumber('access', eventArg)} />`, true)}</div>
2040
2036
  <div>${this.renderFormRow('ID token seconds', '300 to 86400.', html`<input class="input" type="number" .value=${String(this.dialogIdTokenLifetime)} @input=${(eventArg: Event) => this.setDialogNumber('id', eventArg)} />`, true)}</div>
@@ -2250,10 +2246,10 @@ export class IdpAdminShell extends DeesElement {
2250
2246
  ${this.deleteAccountOpen
2251
2247
  ? html`
2252
2248
  ${this.renderFormRow('Confirm your email', 'Type your account email to confirm', html`<input class="input" .value=${this.deleteAccountConfirmEmail} ?disabled=${this.accountDeleting} @input=${(eventArg: Event) => { this.deleteAccountConfirmEmail = (eventArg.target as HTMLInputElement).value; }} />`, true)}
2253
- ${this.renderFormRow('Password', 'Required when your account has one', html`<input class="input" type="password" autocomplete="current-password" .value=${this.deleteAccountPassword} ?disabled=${this.accountDeleting} @input=${(eventArg: Event) => { this.deleteAccountPassword = (eventArg.target as HTMLInputElement).value; }} />`)}
2249
+ ${this.renderFormRow('Password', 'Required. Passwordless account deletion needs a future fresh-auth step-up.', html`<input class="input" type="password" autocomplete="current-password" .value=${this.deleteAccountPassword} ?disabled=${this.accountDeleting} @input=${(eventArg: Event) => { this.deleteAccountPassword = (eventArg.target as HTMLInputElement).value; }} />`)}
2254
2250
  <div class="split-row" style="justify-content:flex-end;gap:10px;margin-top:14px">
2255
2251
  <idp-button variant="outline" shape="rect" ?disabled=${this.accountDeleting} @click=${() => { this.deleteAccountOpen = false; this.deleteAccountPassword = ''; this.deleteAccountConfirmEmail = ''; }}>Cancel</idp-button>
2256
- <idp-button variant="accent" shape="rect" ?loading=${this.accountDeleting} ?disabled=${this.deleteAccountConfirmEmail.trim().toLowerCase() !== (this.user?.email || '').trim().toLowerCase()} @click=${() => this.dispatchShellEvent<IIdpAdminAccountDeleteEventDetail>('idp-admin-account-delete', { password: this.deleteAccountPassword, confirmEmail: this.deleteAccountConfirmEmail.trim() })}>Delete my account</idp-button>
2252
+ <idp-button variant="accent" shape="rect" ?loading=${this.accountDeleting} ?disabled=${!this.deleteAccountPassword || this.deleteAccountConfirmEmail.trim().toLowerCase() !== (this.user?.email || '').trim().toLowerCase()} @click=${() => this.dispatchShellEvent<IIdpAdminAccountDeleteEventDetail>('idp-admin-account-delete', { password: this.deleteAccountPassword, confirmEmail: this.deleteAccountConfirmEmail.trim() })}>Delete my account</idp-button>
2257
2253
  </div>
2258
2254
  `
2259
2255
  : html`<div class="split-row"><div><div class="section-title">Delete this account</div><div class="muted">Organisations you own must be transferred or deleted first.</div></div><idp-button variant="outline" shape="rect" @click=${() => { this.deleteAccountOpen = true; }}>Delete account…</idp-button></div>`}