Skip to content
Snippets Groups Projects
Commit 890bd51a authored by Johan de Klerk's avatar Johan de Klerk
Browse files

Absa: Check for password change screen

parent 76f36d59
No related branches found
No related tags found
No related merge requests found
...@@ -23,6 +23,8 @@ type AbsaLoginInfo struct { ...@@ -23,6 +23,8 @@ type AbsaLoginInfo struct {
IsDebug bool IsDebug bool
} }
var ErrPasswordChange = errors.Error("Absa CIB requires a password change")
const ( const (
sleepTime = time.Second * 2 sleepTime = time.Second * 2
) )
...@@ -194,6 +196,10 @@ func login(client *resty.Client, loginInfo AbsaLoginInfo) error { ...@@ -194,6 +196,10 @@ func login(client *resty.Client, loginInfo AbsaLoginInfo) error {
} }
} }
if strings.Contains(string(responseBytes), "New Password") {
return ErrPasswordChange
}
return nil return nil
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment