File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ interface ChatProfile {
1212 // 登录类型
1313 login_value ?: Array < string >
1414 max_attempts ?: number
15- rasKey ?: string
15+ rsaKey ?: string
1616}
1717
1818interface ChatUserProfile {
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export interface userStateTypes {
1717 edition : 'CE' | 'PE' | 'EE'
1818 workspace_id : string
1919 workspace_list : Array < any > ,
20- rasKey : string
20+ rsaKey : string
2121}
2222
2323const useUserStore = defineStore ( 'user' , {
@@ -28,7 +28,7 @@ const useUserStore = defineStore('user', {
2828 edition : 'CE' ,
2929 workspace_id : '' ,
3030 workspace_list : [ ] ,
31- rasKey : '' ,
31+ rsaKey : '' ,
3232 } ) ,
3333 actions : {
3434 getLanguage ( ) {
@@ -142,7 +142,7 @@ const useUserStore = defineStore('user', {
142142 this . license_is_valid = ok . data . license_is_valid
143143 this . edition = ok . data . edition
144144 this . version = ok . data . version
145- this . rasKey = ok . data . ras
145+ this . rsaKey = ok . data . rsa
146146 const theme = useThemeStore ( )
147147 if ( this . isEE ( ) || this . isPE ( ) ) {
148148 await theme . theme ( )
Original file line number Diff line number Diff line change @@ -251,7 +251,7 @@ const loginHandle = () => {
251251 })
252252 })
253253 } else {
254- const publicKey = forge .pki .publicKeyFromPem (chatUser ?.chat_profile ?.rasKey as any );
254+ const publicKey = forge .pki .publicKeyFromPem (chatUser ?.chat_profile ?.rsaKey as any );
255255 const jsonData = JSON .stringify (loginForm .value );
256256 const utf8Bytes = forge .util .encodeUtf8 (jsonData );
257257 const encrypted = publicKey .encrypt (utf8Bytes , ' RSAES-PKCS1-V1_5' );
Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ const loginHandle = () => {
200200 loading .value = false
201201 })
202202 } else {
203- const publicKey = forge .pki .publicKeyFromPem (user .rasKey );
203+ const publicKey = forge .pki .publicKeyFromPem (user .rsaKey );
204204 // 转换为UTF-8编码后再加密
205205 const jsonData = JSON .stringify (loginForm .value );
206206 const utf8Bytes = forge .util .encodeUtf8 (jsonData );
You can’t perform that action at this time.
0 commit comments