lib/doorkeeper/oauth/token.rb in doorkeeper-5.4.0.rc2 vs lib/doorkeeper/oauth/token.rb in doorkeeper-5.4.0

- old
+ new

@@ -30,17 +30,17 @@ request.parameters[:bearer_token] end def from_bearer_authorization(request) pattern = /^Bearer /i - header = request.authorization + header = request.authorization token_from_header(header, pattern) if match?(header, pattern) end def from_basic_authorization(request) pattern = /^Basic /i - header = request.authorization + header = request.authorization token_from_basic_header(header, pattern) if match?(header, pattern) end private @@ -52,10 +52,10 @@ def decode_basic_credentials_token(encoded_header) Base64.decode64(encoded_header).split(/:/, 2).first end def token_from_header(header, pattern) - header.gsub pattern, "" + header.gsub(pattern, "") end def match?(header, pattern) header&.match(pattern) end