registerFailedAttempt method
- Channel channel
Implementation
AuthenticationChallenge? registerFailedAttempt(Channel channel) {
final current = getChallenge(channel);
if (current == null) return null;
final failedAttempts = current.failedAttempts + 1;
if (failedAttempts >= maxAttempts) {
_challenges.remove(channel);
return null;
}
return generateNewChallenge(channel, failedAttempts: failedAttempts);
}