mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
feat: rename all publicKey occurrences to certificate (#894)
* fix:The certs page is displayed incorrectly * Translations for each language are added * Replace the variables certificat with Certificat with certificate and Certificate * Replace the variables certificat with Certificat with certificate and Certificate * Variable names are more accurate * Variable names are more accurate * Modify the variable name
This commit is contained in:
@ -164,25 +164,25 @@ class CertEditPage extends React.Component {
|
||||
</Row>
|
||||
<Row style={{marginTop: "20px"}} >
|
||||
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
|
||||
{Setting.getLabel(i18next.t("cert:Public key"), i18next.t("cert:Public key - Tooltip"))} :
|
||||
{Setting.getLabel(i18next.t("cert:Certificate"), i18next.t("cert:Certificate - Tooltip"))} :
|
||||
</Col>
|
||||
<Col span={9} >
|
||||
<Button style={{marginRight: "10px", marginBottom: "10px"}} onClick={() => {
|
||||
copy(this.state.cert.publicKey);
|
||||
Setting.showMessage("success", i18next.t("cert:Public key copied to clipboard successfully"));
|
||||
copy(this.state.cert.certificate);
|
||||
Setting.showMessage("success", i18next.t("cert:Certificate copied to clipboard successfully"));
|
||||
}}
|
||||
>
|
||||
{i18next.t("cert:Copy public key")}
|
||||
{i18next.t("cert:Copy certificate")}
|
||||
</Button>
|
||||
<Button type="primary" onClick={() => {
|
||||
const blob = new Blob([this.state.cert.publicKey], {type: "text/plain;charset=utf-8"});
|
||||
const blob = new Blob([this.state.cert.certificate], {type: "text/plain;charset=utf-8"});
|
||||
FileSaver.saveAs(blob, "token_jwt_key.pem");
|
||||
}}
|
||||
>
|
||||
{i18next.t("cert:Download public key")}
|
||||
{i18next.t("cert:Download certificate")}
|
||||
</Button>
|
||||
<TextArea autoSize={{minRows: 30, maxRows: 30}} value={this.state.cert.publicKey} onChange={e => {
|
||||
this.updateCertField("publicKey", e.target.value);
|
||||
<TextArea autoSize={{minRows: 30, maxRows: 30}} value={this.state.cert.certificate} onChange={e => {
|
||||
this.updateCertField("certificate", e.target.value);
|
||||
}} />
|
||||
</Col>
|
||||
<Col span={1} />
|
||||
|
@ -34,7 +34,7 @@ class CertListPage extends BaseListPage {
|
||||
cryptoAlgorithm: "RS256",
|
||||
bitSize: 4096,
|
||||
expireInYears: 20,
|
||||
publicKey: "",
|
||||
certificate: "",
|
||||
privateKey: "",
|
||||
};
|
||||
}
|
||||
|
@ -622,7 +622,7 @@ class ProviderEditPage extends React.Component {
|
||||
</Row>
|
||||
<Row style={{marginTop: "20px"}} >
|
||||
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
|
||||
{Setting.getLabel(i18next.t("provider:IdP"), i18next.t("provider:IdP public key"))} :
|
||||
{Setting.getLabel(i18next.t("provider:IdP"), i18next.t("provider:IdP certificate"))} :
|
||||
</Col>
|
||||
<Col span={22} >
|
||||
<Input value={this.state.provider.idP} onChange={e => {
|
||||
|
@ -638,13 +638,13 @@ class LoginPage extends React.Component {
|
||||
throw credentialRequestOptions.status.msg;
|
||||
}
|
||||
|
||||
credentialRequestOptions.publicKey.challenge = UserWebauthnBackend.webAuthnBufferDecode(credentialRequestOptions.publicKey.challenge);
|
||||
credentialRequestOptions.publicKey.allowCredentials.forEach(function(listItem) {
|
||||
credentialRequestOptions.certificate.challenge = UserWebauthnBackend.webAuthnBufferDecode(credentialRequestOptions.certificate.challenge);
|
||||
credentialRequestOptions.certificate.allowCredentials.forEach(function(listItem) {
|
||||
listItem.id = UserWebauthnBackend.webAuthnBufferDecode(listItem.id);
|
||||
});
|
||||
|
||||
return navigator.credentials.get({
|
||||
publicKey: credentialRequestOptions.publicKey
|
||||
certificate: credentialRequestOptions.certificate
|
||||
});
|
||||
})
|
||||
.then((assertion) => {
|
||||
|
@ -21,15 +21,15 @@ export function registerWebauthnCredential() {
|
||||
})
|
||||
.then(res => res.json())
|
||||
.then((credentialCreationOptions) => {
|
||||
credentialCreationOptions.publicKey.challenge = webAuthnBufferDecode(credentialCreationOptions.publicKey.challenge);
|
||||
credentialCreationOptions.publicKey.user.id = webAuthnBufferDecode(credentialCreationOptions.publicKey.user.id);
|
||||
if (credentialCreationOptions.publicKey.excludeCredentials) {
|
||||
for (var i = 0; i < credentialCreationOptions.publicKey.excludeCredentials.length; i++) {
|
||||
credentialCreationOptions.publicKey.excludeCredentials[i].id = webAuthnBufferDecode(credentialCreationOptions.publicKey.excludeCredentials[i].id);
|
||||
credentialCreationOptions.certificate.challenge = webAuthnBufferDecode(credentialCreationOptions.certificate.challenge);
|
||||
credentialCreationOptions.certificate.user.id = webAuthnBufferDecode(credentialCreationOptions.certificate.user.id);
|
||||
if (credentialCreationOptions.certificate.excludeCredentials) {
|
||||
for (var i = 0; i < credentialCreationOptions.certificate.excludeCredentials.length; i++) {
|
||||
credentialCreationOptions.certificate.excludeCredentials[i].id = webAuthnBufferDecode(credentialCreationOptions.certificate.excludeCredentials[i].id);
|
||||
}
|
||||
}
|
||||
return navigator.credentials.create({
|
||||
publicKey: credentialCreationOptions.publicKey
|
||||
certificate: credentialCreationOptions.certificate
|
||||
});
|
||||
})
|
||||
.then((credential) => {
|
||||
|
@ -51,11 +51,11 @@
|
||||
"Bit size": "Bitgröße",
|
||||
"Bit size - Tooltip": "Bit Größe - Tooltip",
|
||||
"Copy private key": "Privaten Schlüssel kopieren",
|
||||
"Copy public key": "Öffentlichen Schlüssel kopieren",
|
||||
"Copy certificate": "Kopieren des Zertifikats",
|
||||
"Crypto algorithm": "Crypto-Algorithmus",
|
||||
"Crypto algorithm - Tooltip": "Crypto algorithm - Tooltip",
|
||||
"Download private key": "Privaten Schlüssel herunterladen",
|
||||
"Download public key": "Öffentlichen Schlüssel herunterladen",
|
||||
"Download certificate": "Zertifikat herunterladen",
|
||||
"Edit Cert": "Zitat bearbeiten",
|
||||
"Expire in years": "Gültig in Jahren",
|
||||
"Expire in years - Tooltip": "Verfällt in Jahren - Tooltip",
|
||||
@ -63,9 +63,9 @@
|
||||
"Private key": "Privater Schlüssel",
|
||||
"Private key - Tooltip": "Privater Schlüssel - Tooltip",
|
||||
"Private key copied to clipboard successfully": "Privater Schlüssel erfolgreich in die Zwischenablage kopiert",
|
||||
"Public key": "Öffentlicher Schlüssel",
|
||||
"Public key - Tooltip": "Öffentlicher Schlüssel - Tooltip",
|
||||
"Public key copied to clipboard successfully": "Öffentlicher Schlüssel erfolgreich in die Zwischenablage kopiert",
|
||||
"Certificate": "Zertifikat",
|
||||
"Certificate - Tooltip": "Zertifikat - Tooltip",
|
||||
"Certificate copied to clipboard successfully": "Das Zertifikat wurde erfolgreich in die Zwischenablage kopiert",
|
||||
"Scope": "Bereich",
|
||||
"Scope - Tooltip": "Bereich - Tooltip",
|
||||
"Type": "Typ",
|
||||
@ -426,7 +426,7 @@
|
||||
"Host": "Host",
|
||||
"Host - Tooltip": "Unique string-style identifier",
|
||||
"IdP": "IdP",
|
||||
"IdP public key": "IdP-öffentlicher Schlüssel",
|
||||
"IdP certificate": "IdP-öffentlicher Schlüssel",
|
||||
"Issuer URL": "Ausgabe-URL",
|
||||
"Issuer URL - Tooltip": "Ausgabe-URL - Tooltip",
|
||||
"Link copied to clipboard successfully": "Link erfolgreich in die Zwischenablage kopiert",
|
||||
|
@ -51,11 +51,11 @@
|
||||
"Bit size": "Bit size",
|
||||
"Bit size - Tooltip": "Bit size - Tooltip",
|
||||
"Copy private key": "Copy private key",
|
||||
"Copy public key": "Copy public key",
|
||||
"Copy certificate": "Copy certificate",
|
||||
"Crypto algorithm": "Crypto algorithm",
|
||||
"Crypto algorithm - Tooltip": "Crypto algorithm - Tooltip",
|
||||
"Download private key": "Download private key",
|
||||
"Download public key": "Download public key",
|
||||
"Download certificate": "Download certificate",
|
||||
"Edit Cert": "Edit Cert",
|
||||
"Expire in years": "Expire in years",
|
||||
"Expire in years - Tooltip": "Expire in years - Tooltip",
|
||||
@ -63,9 +63,9 @@
|
||||
"Private key": "Private key",
|
||||
"Private key - Tooltip": "Private key - Tooltip",
|
||||
"Private key copied to clipboard successfully": "Private key copied to clipboard successfully",
|
||||
"Public key": "Public key",
|
||||
"Public key - Tooltip": "Public key - Tooltip",
|
||||
"Public key copied to clipboard successfully": "Public key copied to clipboard successfully",
|
||||
"Certificate": "Certificate",
|
||||
"Certificate - Tooltip": "Certificate - Tooltip",
|
||||
"Certificate copied to clipboard successfully": "Certificate copied to clipboard successfully",
|
||||
"Scope": "Scope",
|
||||
"Scope - Tooltip": "Scope - Tooltip",
|
||||
"Type": "Type",
|
||||
@ -426,7 +426,7 @@
|
||||
"Host": "Host",
|
||||
"Host - Tooltip": "Host - Tooltip",
|
||||
"IdP": "IdP",
|
||||
"IdP public key": "IdP public key",
|
||||
"IdP certificate": "IdP certificate",
|
||||
"Issuer URL": "Issuer URL",
|
||||
"Issuer URL - Tooltip": "Issuer URL - Tooltip",
|
||||
"Link copied to clipboard successfully": "Link copied to clipboard successfully",
|
||||
|
@ -51,21 +51,21 @@
|
||||
"Bit size": "Taille du bit",
|
||||
"Bit size - Tooltip": "Taille du bit - Infobulle",
|
||||
"Copy private key": "Copier la clé privée",
|
||||
"Copy public key": "Copier la clé publique",
|
||||
"Copy certificate": "Copier le certificate",
|
||||
"Crypto algorithm": "Algorithme de cryptomonnaie",
|
||||
"Crypto algorithm - Tooltip": "Crypto algorithm - Tooltip",
|
||||
"Download private key": "Télécharger la clé privée",
|
||||
"Download public key": "Télécharger la clé publique",
|
||||
"Edit Cert": "Modifier le certificat",
|
||||
"Download certificate": "Télécharger le certificate",
|
||||
"Edit Cert": "Modifier le certificate",
|
||||
"Expire in years": "Expire dans les années",
|
||||
"Expire in years - Tooltip": "Expire dans les années - infobulle",
|
||||
"New Cert": "New Cert",
|
||||
"Private key": "Clé privée",
|
||||
"Private key - Tooltip": "Clé privée - Infobulle",
|
||||
"Private key copied to clipboard successfully": "Clé privée copiée dans le presse-papiers avec succès",
|
||||
"Public key": "Clé publique",
|
||||
"Public key - Tooltip": "Clé publique - Infobulle",
|
||||
"Public key copied to clipboard successfully": "Clé publique copiée dans le presse-papiers avec succès",
|
||||
"Certificate": "certificate",
|
||||
"Certificate - Tooltip": "certificate - Infobulle",
|
||||
"Certificate copied to clipboard successfully": "Le certificate a été copié avec succès dans le presse-papiers",
|
||||
"Scope": "Périmètre d'application",
|
||||
"Scope - Tooltip": "Scope - Infobulle",
|
||||
"Type": "Type de texte",
|
||||
@ -426,7 +426,7 @@
|
||||
"Host": "Hôte",
|
||||
"Host - Tooltip": "Unique string-style identifier",
|
||||
"IdP": "IDP",
|
||||
"IdP public key": "Clé publique IdP",
|
||||
"IdP certificate": "Clé publique IdP",
|
||||
"Issuer URL": "URL de l'émetteur",
|
||||
"Issuer URL - Tooltip": "URL de l'émetteur - infobulle",
|
||||
"Link copied to clipboard successfully": "Lien copié dans le presse-papiers avec succès",
|
||||
|
@ -51,11 +51,11 @@
|
||||
"Bit size": "ビットサイズ",
|
||||
"Bit size - Tooltip": "ビットサイズ - ツールチップ",
|
||||
"Copy private key": "秘密鍵をコピー",
|
||||
"Copy public key": "公開鍵をコピー",
|
||||
"Copy certificate": "証明書をコピーします",
|
||||
"Crypto algorithm": "暗号化アルゴリズム",
|
||||
"Crypto algorithm - Tooltip": "Crypto algorithm - Tooltip",
|
||||
"Download private key": "秘密鍵をダウンロード",
|
||||
"Download public key": "公開鍵をダウンロード",
|
||||
"Download certificate": "証明書をダウンロードします",
|
||||
"Edit Cert": "Certを編集",
|
||||
"Expire in years": "有効期限",
|
||||
"Expire in years - Tooltip": "年間有効期限 - ツールチップ",
|
||||
@ -63,9 +63,9 @@
|
||||
"Private key": "Private key",
|
||||
"Private key - Tooltip": "Private key - Tooltip",
|
||||
"Private key copied to clipboard successfully": "秘密鍵を正常にクリップボードにコピーしました",
|
||||
"Public key": "公開キー",
|
||||
"Public key - Tooltip": "Public key - Tooltip",
|
||||
"Public key copied to clipboard successfully": "公開鍵を正常にクリップボードにコピーしました",
|
||||
"Certificate": "Certificate",
|
||||
"Certificate - Tooltip": "Certificate - Tooltip",
|
||||
"Certificate copied to clipboard successfully": "証明書はクリップボードに正常にコピーされました",
|
||||
"Scope": "スコープ",
|
||||
"Scope - Tooltip": "スコープ → ツールチップ",
|
||||
"Type": "タイプ",
|
||||
@ -426,7 +426,7 @@
|
||||
"Host": "ホスト",
|
||||
"Host - Tooltip": "Unique string-style identifier",
|
||||
"IdP": "IdP",
|
||||
"IdP public key": "IdP public key",
|
||||
"IdP certificate": "IdP certificate",
|
||||
"Issuer URL": "Issuer URL",
|
||||
"Issuer URL - Tooltip": "Issuer URL - ツールチップ",
|
||||
"Link copied to clipboard successfully": "リンクをクリップボードにコピーしました",
|
||||
|
@ -51,11 +51,11 @@
|
||||
"Bit size": "Bit size",
|
||||
"Bit size - Tooltip": "Bit size - Tooltip",
|
||||
"Copy private key": "Copy private key",
|
||||
"Copy public key": "Copy public key",
|
||||
"Copy certificate": "Copy certificate",
|
||||
"Crypto algorithm": "Crypto algorithm",
|
||||
"Crypto algorithm - Tooltip": "Crypto algorithm - Tooltip",
|
||||
"Download private key": "Download private key",
|
||||
"Download public key": "Download public key",
|
||||
"Download certificate": "Download certificate",
|
||||
"Edit Cert": "Edit Cert",
|
||||
"Expire in years": "Expire in years",
|
||||
"Expire in years - Tooltip": "Expire in years - Tooltip",
|
||||
@ -63,9 +63,9 @@
|
||||
"Private key": "Private key",
|
||||
"Private key - Tooltip": "Private key - Tooltip",
|
||||
"Private key copied to clipboard successfully": "Private key copied to clipboard successfully",
|
||||
"Public key": "Public key",
|
||||
"Public key - Tooltip": "Public key - Tooltip",
|
||||
"Public key copied to clipboard successfully": "Public key copied to clipboard successfully",
|
||||
"Certificate": "Certificate",
|
||||
"Certificate - Tooltip": "Certificate - Tooltip",
|
||||
"Certificate copied to clipboard successfully": "Certificate copied to clipboard successfully",
|
||||
"Scope": "Scope",
|
||||
"Scope - Tooltip": "Scope - Tooltip",
|
||||
"Type": "Type",
|
||||
@ -426,7 +426,7 @@
|
||||
"Host": "Host",
|
||||
"Host - Tooltip": "Unique string-style identifier",
|
||||
"IdP": "IdP",
|
||||
"IdP public key": "IdP public key",
|
||||
"IdP certificate": "IdP certificate",
|
||||
"Issuer URL": "Issuer URL",
|
||||
"Issuer URL - Tooltip": "Issuer URL - Tooltip",
|
||||
"Link copied to clipboard successfully": "Link copied to clipboard successfully",
|
||||
|
@ -51,11 +51,11 @@
|
||||
"Bit size": "Размер бита",
|
||||
"Bit size - Tooltip": "Размер бита - Подсказка",
|
||||
"Copy private key": "Копировать закрытый ключ",
|
||||
"Copy public key": "Копировать открытый ключ",
|
||||
"Copy certificate": "Копирование сертификата",
|
||||
"Crypto algorithm": "Алгоритм крипто",
|
||||
"Crypto algorithm - Tooltip": "Crypto algorithm - Tooltip",
|
||||
"Download private key": "Скачать закрытый ключ",
|
||||
"Download public key": "Скачать открытый ключ",
|
||||
"Download certificate": "Скачать сертификат",
|
||||
"Edit Cert": "Изменить сертификат",
|
||||
"Expire in years": "Истекает через годы",
|
||||
"Expire in years - Tooltip": "Истекает через годы - Подсказка",
|
||||
@ -63,9 +63,9 @@
|
||||
"Private key": "Приватный ключ",
|
||||
"Private key - Tooltip": "Приватный ключ - Подсказка",
|
||||
"Private key copied to clipboard successfully": "Приватный ключ скопирован в буфер обмена",
|
||||
"Public key": "Публичный ключ",
|
||||
"Public key - Tooltip": "Открытый ключ - Подсказка",
|
||||
"Public key copied to clipboard successfully": "Открытый ключ успешно скопирован в буфер обмена",
|
||||
"Certificate": "сертификат",
|
||||
"Certificate - Tooltip": "сертификат - Подсказка",
|
||||
"Certificate copied to clipboard successfully": "Сертификат успешно скопирован в буфер обмена",
|
||||
"Scope": "Сфера охвата",
|
||||
"Scope - Tooltip": "Область применения - Подсказка",
|
||||
"Type": "Тип",
|
||||
@ -426,7 +426,7 @@
|
||||
"Host": "Хост",
|
||||
"Host - Tooltip": "Unique string-style identifier",
|
||||
"IdP": "ИдП",
|
||||
"IdP public key": "Публичный ключ IdP",
|
||||
"IdP certificate": "Публичный ключ IdP",
|
||||
"Issuer URL": "URL эмитента",
|
||||
"Issuer URL - Tooltip": "URL эмитента - Tooltip",
|
||||
"Link copied to clipboard successfully": "Ссылка скопирована в буфер обмена",
|
||||
|
@ -51,11 +51,11 @@
|
||||
"Bit size": "位大小",
|
||||
"Bit size - Tooltip": "位大小 - 工具提示",
|
||||
"Copy private key": "复制私钥",
|
||||
"Copy public key": "复制公钥",
|
||||
"Copy certificate": "复制证书",
|
||||
"Crypto algorithm": "加密算法",
|
||||
"Crypto algorithm - Tooltip": "Crypto algorithm - Tooltip",
|
||||
"Download private key": "下载私钥",
|
||||
"Download public key": "下载公钥",
|
||||
"Download certificate": "下载证书",
|
||||
"Edit Cert": "编辑证书",
|
||||
"Expire in years": "有效期(年)",
|
||||
"Expire in years - Tooltip": "到期年份-工具提示",
|
||||
@ -63,9 +63,9 @@
|
||||
"Private key": "私钥",
|
||||
"Private key - Tooltip": "私钥 - 工具提示",
|
||||
"Private key copied to clipboard successfully": "私钥已成功复制到剪贴板",
|
||||
"Public key": "公钥",
|
||||
"Public key - Tooltip": "公钥 - 工具提示",
|
||||
"Public key copied to clipboard successfully": "公钥已成功复制到剪贴板",
|
||||
"Certificate": "证书",
|
||||
"Certificate - Tooltip": "证书 - 工具提示",
|
||||
"Certificate copied to clipboard successfully": "证书已成功复制到剪贴板",
|
||||
"Scope": "用途",
|
||||
"Scope - Tooltip": "范围 - 工具提示",
|
||||
"Type": "类型",
|
||||
@ -426,7 +426,7 @@
|
||||
"Host": "主机",
|
||||
"Host - Tooltip": "主机",
|
||||
"IdP": "IdP",
|
||||
"IdP public key": "IdP 公钥",
|
||||
"IdP certificate": "IdP 公钥",
|
||||
"Issuer URL": "发行者网址",
|
||||
"Issuer URL - Tooltip": "发行者URL - 工具提示",
|
||||
"Link copied to clipboard successfully": "链接已成功复制到剪贴板",
|
||||
|
Reference in New Issue
Block a user