File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -633,6 +633,19 @@ async fn _user_api_key_login(
633633 Value :: Null
634634 } ;
635635
636+ let account_keys = if user. private_key . is_some ( ) {
637+ json ! ( {
638+ "publicKeyEncryptionKeyPair" : {
639+ "wrappedPrivateKey" : user. private_key,
640+ "publicKey" : user. public_key,
641+ "Object" : "publicKeyEncryptionKeyPair"
642+ } ,
643+ "Object" : "privateKeys"
644+ } )
645+ } else {
646+ Value :: Null
647+ } ;
648+
636649 // Note: No refresh_token is returned. The CLI just repeats the
637650 // client_credentials login flow when the existing token expires.
638651 let result = json ! ( {
@@ -649,6 +662,7 @@ async fn _user_api_key_login(
649662 "ResetMasterPassword" : false , // TODO: according to official server seems something like: user.password_hash.is_empty(), but would need testing
650663 "ForcePasswordReset" : false ,
651664 "scope" : AuthMethod :: UserApiKey . scope( ) ,
665+ "AccountKeys" : account_keys,
652666 "UserDecryptionOptions" : {
653667 "HasMasterPassword" : has_master_password,
654668 "MasterPasswordUnlock" : master_password_unlock,
You can’t perform that action at this time.
0 commit comments