Class: Otto::Security::Authentication::AuthStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/otto/security/authentication/auth_strategy.rb

Overview

Base class for all authentication strategies

Instance Method Summary collapse

Instance Method Details

#authenticate(env, requirement) ⇒ Otto::Security::Authentication::StrategyResult, Otto::Security::Authentication::AuthFailure

Check if the request meets the authentication requirements

Parameters:

  • env (Hash)

    Rack environment

  • requirement (String)

    Authentication requirement string

Returns:

Raises:

  • (NotImplementedError)


19
20
21
# File 'lib/otto/security/authentication/auth_strategy.rb', line 19

def authenticate(env, requirement)
  raise NotImplementedError, 'Subclasses must implement #authenticate'
end