Module: Doorkeeper::OAuth::Token::Methods

Included in:
Doorkeeper::OAuth::Token
Defined in:
lib/doorkeeper/oauth/token.rb

Instance Method Summary collapse

Instance Method Details

#from_access_token_param(request) ⇒ Object



5
6
7
# File 'lib/doorkeeper/oauth/token.rb', line 5

def from_access_token_param(request)
  request.parameters[:access_token]
end

#from_bearer_authorization(request) ⇒ Object



13
14
15
16
17
# File 'lib/doorkeeper/oauth/token.rb', line 13

def from_bearer_authorization(request)
  pattern = /^Bearer /
  header  = request.authorization
  header.gsub pattern, '' if header && header.match(pattern)
end

#from_bearer_param(request) ⇒ Object



9
10
11
# File 'lib/doorkeeper/oauth/token.rb', line 9

def from_bearer_param(request)
  request.parameters[:bearer_token]
end