Class: Leech::Handlers::Auth

Inherits:
Leech::Handler show all
Defined in:
lib/leech/handlers/auth.rb

Overview

Simple authorization handler. It uses password string (passcode) for authorize client session.

### Usage

Leech::Server.new { use :auth }

### Supported commands

AUTHORIZE passcode

### Possible Answers

UNAUTHORIZED   
AUTHORIZED

Defined Under Namespace

Modules: ServerMethods

Instance Attribute Summary

Attributes inherited from Leech::Handler

#env, #params

Class Method Summary collapse

Methods inherited from Leech::Handler

#call, handle, #initialize, #match, matchers

Constructor Details

This class inherits a constructor from Leech::Handler

Class Method Details

.used(server) ⇒ Object



16
17
18
19
20
# File 'lib/leech/handlers/auth.rb', line 16

def self.used(server)
  server.instance_eval do 
    extend ServerMethods
  end
end