Module: Roda::RodaPlugins::BearerToken::RequestMethods
- Defined in:
- lib/roda/plugins/bearer_token.rb
Overview
:nocov:
Instance Method Summary collapse
-
#bearer_token ⇒ Object
Return the bearer token for the request if there is one in the authorization HTTP header.
Instance Method Details
#bearer_token ⇒ Object
Return the bearer token for the request if there is one in the authorization HTTP header.
18 19 20 21 22 |
# File 'lib/roda/plugins/bearer_token.rb', line 18 def bearer_token if (auth = @env["HTTP_AUTHORIZATION"]) && auth.send(METHOD, /\Abearer /i) auth[7, 100000000] end end |