Timshel
3 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
12 additions and
8 deletions
-
src/api/identity.rs
|
|
|
@ -482,14 +482,18 @@ async fn authenticated_response( |
|
|
|
Value::Null |
|
|
|
}; |
|
|
|
|
|
|
|
let account_keys = json!({ |
|
|
|
"publicKeyEncryptionKeyPair": { |
|
|
|
"wrappedPrivateKey": user.private_key, |
|
|
|
"publicKey": user.public_key, |
|
|
|
"Object": "publicKeyEncryptionKeyPair" |
|
|
|
}, |
|
|
|
"Object": "privateKeys" |
|
|
|
}); |
|
|
|
let account_keys = if user.private_key.is_some() { |
|
|
|
json!({ |
|
|
|
"publicKeyEncryptionKeyPair": { |
|
|
|
"wrappedPrivateKey": user.private_key, |
|
|
|
"publicKey": user.public_key, |
|
|
|
"Object": "publicKeyEncryptionKeyPair" |
|
|
|
}, |
|
|
|
"Object": "privateKeys" |
|
|
|
}) |
|
|
|
} else { |
|
|
|
Value::Null |
|
|
|
}; |
|
|
|
|
|
|
|
let mut result = json!({ |
|
|
|
"access_token": auth_tokens.access_token(), |
|
|
|
|