mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 23:56:56 +00:00
GODT-2173: fix: Migrate Bridge password from v2.X.
This commit is contained in:
@ -99,11 +99,18 @@ func (user *User) SetAddressMode(mode AddressMode) error {
|
||||
})
|
||||
}
|
||||
|
||||
// BridgePass returns the user's bridge password (unencoded).
|
||||
// BridgePass returns the user's bridge password as raw token bytes (unencoded).
|
||||
func (user *User) BridgePass() []byte {
|
||||
return user.vault.getUser(user.userID).BridgePass
|
||||
}
|
||||
|
||||
// SetBridgePass saves bridge password as raw token bytes (unecoded).
|
||||
func (user *User) SetBridgePass(newPass []byte) error {
|
||||
return user.vault.modUser(user.userID, func(data *UserData) {
|
||||
data.BridgePass = newPass
|
||||
})
|
||||
}
|
||||
|
||||
// AuthUID returns the user's auth UID.
|
||||
func (user *User) AuthUID() string {
|
||||
return user.vault.getUser(user.userID).AuthUID
|
||||
|
||||
Reference in New Issue
Block a user