Module: Autumn::Authentication

Defined in:
lib/autumn/authentication.rb

Overview

Defines classes which each encapsulate a different strategy for authentication. When the authentication option is specified (see the Autumn::Leaf class), the options given are used to choose the correct class within this module to serve as the authenticator for that leaf.

These authentication strategies are used to ensure only authorized users have access to protected commands. Leaf authors can designate certain commands as protected.

Writing Your Own Authenticators

When the Autumn::Leaf#authenticate method is called, it converts the symbol from snake_case to CamelCase, and looks for a class in this model. Thus, a call to authenticate :hostname would look for a class Autumn::Authentication::Hostname.

To define your own authenticator, subclass Autumn::Authentication::Base as a new class in the Autumn::Authentication module. Implement the methods defined in the Autumn::Authentication::Base class docs, then adjust your configuration to use your new authenticator.

Defined Under Namespace

Classes: Base, Hostname, Nick, Op, Password