ScramAuthentication constructor

ScramAuthentication(
  1. String secret, {
  2. Duration? challengeTimeout,
  3. bool reuseClientKey = false,
})

Initialized the instance with the secret and an optional challengeTimeout which will cause the authentication process to fail if the server response took too long. The reuseClientKey option will compute the client key only for the first time. The second time stored client key is used

Implementation

ScramAuthentication(String secret,
    {Duration? challengeTimeout, bool reuseClientKey = false}) {
  if (challengeTimeout != null) {
    _challengeTimeout = challengeTimeout;
  }
  _reuseClientKey = reuseClientKey;
  _secret = Saslprep.saslprep(secret);
}