Add an API to reset the password

This commit is contained in:
Nikolai Rodionov 2024-05-22 00:16:13 +02:00
parent 1c91487a33
commit cfb596e68b
Signed by: allanger
GPG Key ID: 0AA46A90E25592AD

View File

@ -231,20 +231,6 @@ func (acc *Account) ResetPassword(ctx context.Context, emailConfig email.EmailCo
acc.Data.UUID = string(userdata.Data["uuid"]) acc.Data.UUID = string(userdata.Data["uuid"])
conf := &rest.Config{
Host: "https://kubernetes.default.svc.cluster.local:443",
BearerToken: acc.Token,
TLSClientConfig: rest.TLSClientConfig{
Insecure: true,
},
}
clientset, err = kubernetes.NewForConfig(conf)
if err != nil {
logrus.Error(err, "Couldn't create a new clientset")
return "", consts.ErrSystemError
}
secretName := "password-reset-code" secretName := "password-reset-code"
number := encodeToString(6) number := encodeToString(6)
secret := corev1.Secret{ secret := corev1.Secret{