diff --git a/web/src/admin/providers/saml/SAMLProviderViewPage.ts b/web/src/admin/providers/saml/SAMLProviderViewPage.ts index b803f55fe..9bdc451ef 100644 --- a/web/src/admin/providers/saml/SAMLProviderViewPage.ts +++ b/web/src/admin/providers/saml/SAMLProviderViewPage.ts @@ -75,32 +75,59 @@ export class SAMLProviderViewPage extends AKElement { } async renderRelatedObjects(): Promise { - if (!this.provider?.signingKp) { - return Promise.resolve(html``); + const relatedObjects = []; + if (this.provider?.assignedApplicationName) { + relatedObjects.push(html`
+
+ ${t`Metadata`} +
+
+
+ + ${t`Download`} + + { + return navigator.clipboard.writeText( + this.provider?.urlDownloadMetadata || "", + ); + }} + > + ${t`Copy download URL`} + +
+
+
`); + } + if (this.provider?.signingKp) { + const kp = await new CryptoApi(DEFAULT_CONFIG).cryptoCertificatekeypairsRetrieve({ + kpUuid: this.provider.signingKp, + }); + relatedObjects.push(html`
+
+ ${t`Download signing certificate`} +
+
+ +
+
`); } - const kp = await new CryptoApi(DEFAULT_CONFIG).cryptoCertificatekeypairsRetrieve({ - kpUuid: this.provider.signingKp, - }); return html`
${t`Related objects`}
-
-
- ${t`Download signing certificate`} -
-
- -
-
+ ${relatedObjects.length > 0 ? relatedObjects : html`-`}
`;