def on_authentication_failure(user, kind, credentials, reason)
      @config.logger.info("Authentication attempt#{" by \"#{user.username}\"" if user} " <<
                          "failed: #{reason}.")
      poll(:on_authentication_failure, user, kind, credentials, reason)
    end
def on_authentication_failure(user, kind, credentials, reason)
      @config.logger.info("Authentication attempt#{" by \"#{user.username}\"" if user} " <<
                          "failed: #{reason}.")
      poll(:on_authentication_failure, user, kind, credentials, reason)
    end
A callback which is invoked when {#valid_credentials?}  is going
 to return `false` or `nil`.  It has no control over whether
 authentication will proceed &mdash; it's just a notification.

 The composite behavior is to invoke the callback on all the
 authorities which implement it.

 @param [Aker::User,nil] user the user whose access is being
   denied.  This may be nil if the authentication failure happens
   before the credentials are mapped to a user.
 @param [Symbol] kind the kind of credentials (the same value
   originally passed to {#valid_credentials?}).
 @param [Array] credentials the actual credentials which were
   determined to be valid (the same value originally passed to
   {#valid_credentials?}).
 @param [String] reason the reason why authentication failed,
   broadly speaking; e.g., `"invalid credentials"` or `"user vetoed
   by MyLockoutAuthority"`.

 @return [void]