Class: Rack::Reqorder::Monitor::Helpers::AuthorizationHeader
- Inherits:
-
Object
- Object
- Rack::Reqorder::Monitor::Helpers::AuthorizationHeader
- Defined in:
- lib/rack/reqorder/monitor/helpers.rb
Overview
taken from rails ActionController::HttpAuthentication::Token ^_^
Constant Summary collapse
- TOKEN_KEY =
'token='
- TOKEN_REGEX =
/^(Token|Bearer) /
- AUTHN_PAIR_DELIMITERS =
/(?:,|;|\t+)/
Class Method Summary collapse
Class Method Details
.token_and_options(headers) ⇒ Object
51 52 53 54 55 56 57 58 |
# File 'lib/rack/reqorder/monitor/helpers.rb', line 51 def (headers) = headers['Authorization'] if [TOKEN_REGEX] params = token_params_from [params.shift[1], Hash[params].with_indifferent_access] end end |