From 2f7cb16e11bb7b267aef123dd61c4db9e8c6e25e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E9=9F=A9?= Date: Wed, 11 Dec 2019 15:10:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20saml=E6=94=AF=E6=8C=81=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/models/oneid.ts | 2 ++ src/oneid-app/admin/apps/AddApp.ts | 32 +++++++++++++++++++++++++++--- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/src/models/oneid.ts b/src/models/oneid.ts index 8acd5208..a09b39a9 100644 --- a/src/models/oneid.ts +++ b/src/models/oneid.ts @@ -571,6 +571,8 @@ export class SamlData { entity_id = '' acs = '' sls = '' + cert = '' + xmldata = '' } export interface AccessPermData { diff --git a/src/oneid-app/admin/apps/AddApp.ts b/src/oneid-app/admin/apps/AddApp.ts index 73e054e1..2915985c 100644 --- a/src/oneid-app/admin/apps/AddApp.ts +++ b/src/oneid-app/admin/apps/AddApp.ts @@ -94,15 +94,30 @@ import './AddApp.less' - + - + - + + + + + + + + + @@ -235,6 +250,8 @@ export default class AddApp extends Vue { entity_id: this.app!.saml_app!.entity_id, acs: this.app!.saml_app!.acs, sls: this.app!.saml_app!.sls, + cert: this.app!.saml_app!.cert, + xmldata: this.app!.saml_app!.xmldata, } } else { params.saml_app = null @@ -286,4 +303,13 @@ export default class AddApp extends Vue { this.showAdd = false this.$emit('on-change') } + + handleBeforeUpload(file: File) { + const reader = new FileReader() + reader.readAsText(file) + reader.onload = (e) => { + this.app!.saml_app!.xmldata = e.target!.result as string + } + return false + } }