Class: Auth::Middleware::Request
- Inherits:
-
Rack::Auth::AbstractRequest
- Object
- Rack::Auth::AbstractRequest
- Auth::Middleware::Request
- Defined in:
- lib/auth/middleware.rb
Instance Method Summary collapse
Instance Method Details
#access_token ⇒ Object
61 62 63 64 |
# File 'lib/auth/middleware.rb', line 61 def access_token @access_token ||= params ? params.unpack("m*").first : request.params['access_token'] end |
#account_id ⇒ Object
66 67 68 |
# File 'lib/auth/middleware.rb', line 66 def account_id @account_id ||= Auth.validate_token(access_token) end |
#bearer? ⇒ Boolean
49 50 51 |
# File 'lib/auth/middleware.rb', line 49 def bearer? :bearer == scheme end |
#parts ⇒ Object
57 58 59 |
# File 'lib/auth/middleware.rb', line 57 def parts ? super : ['Bearer', nil] end |
#provided? ⇒ Boolean
53 54 55 |
# File 'lib/auth/middleware.rb', line 53 def provided? super || request.params['access_token'] end |