mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-15 01:18:26 +08:00
Go: default public key (#16265)
### What problem does this PR solve? Provider default public key for CLI ### Type of change - [x] Refactoring Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -160,8 +160,14 @@ func (c *CLI) PingServer(iterations int) (ResponseIf, error) {
|
||||
|
||||
// loginUser performs the actual login request
|
||||
func (c *CLI) loginUser(email, password string) (string, error) {
|
||||
// Encrypt password using scrypt (same as Python implementation)
|
||||
encryptedPassword, err := EncryptPassword(password)
|
||||
publicKey, err := c.GetPublicKeyPEM()
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to get public key: %w", err)
|
||||
}
|
||||
|
||||
// Encrypt password using RSA
|
||||
encryptedPassword, err := EncryptPassword(password, publicKey)
|
||||
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to encrypt password: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user