lib/httpx/plugins/authentication.rb in httpx-0.24.1 vs lib/httpx/plugins/authentication.rb in httpx-0.24.2
- old
+ new
@@ -11,9 +11,13 @@
module Authentication
module InstanceMethods
def authentication(token)
with(headers: { "authorization" => token })
end
+
+ def bearer_auth(token)
+ authentication("Bearer #{token}")
+ end
end
end
register_plugin :authentication, Authentication
end
end