Module: Zas::Filters::HttpBasicAuth

Defined in:
lib/zas/filters/http_basic_auth.rb

Overview

Public: Filter that base64 decodes the credentials and splits them on a colon (based on the HTTP Basic Authentication speciications).

Class Method Summary collapse

Class Method Details

.authenticate(credentials) ⇒ Object

Public: Filter the authentication credentials.

credentials - The credentials

Returns a pair of [username, password]



14
15
16
17
# File 'lib/zas/filters/http_basic_auth.rb', line 14

def authenticate(credentials)
  decoded_credentials = Base64.decode64(credentials)
  decoded_credentials.split(":")
end