Class | Autumn::Authentication::Password |
In: |
lib/autumn/authentication.rb
|
Parent: | Base |
Authenticates by a password provided in secret. When a user PRIVMSG‘s the leaf the correct password, the leaf adds that user‘s nick to a list of authorized nicks. These credentials expire when the person changes his nick, logs out, leaves the channel, etc. They also expire if a certain amount of time passes without running any protected commands.
DEFAULT_EXPIRE_TIME | = | 5*60 | The default period of time that must occur with no use of protected commands after which a user‘s credentials expire. |
Creates a new authenticator. You provide a valid password with the password option. If that option is not provided, an exception is raised. You can pass a number of seconds to the expire_time option; this is the amount of time that must pass with no protected commands for a nick‘s authorization to expire. If the expire_time option is not given, a default value of five minutes is used.