Methods
Public Class
Public Instance
Public Class methods
new(*)
[show source]
# File lib/httpx/plugins/auth.rb 43 def initialize(*) 44 super 45 46 @auth_header_value = nil 47 @skip_auth_header_value = false 48 end
Public Instance methods
authorization(token = nil, auth_header_type: nil, &blk)
[show source]
# File lib/httpx/plugins/auth.rb 50 def authorization(token = nil, auth_header_type: nil, &blk) 51 with(auth_header_type: auth_header_type, auth_header_value: token || blk) 52 end
bearer_auth(token = nil, &blk)
[show source]
# File lib/httpx/plugins/auth.rb 54 def bearer_auth(token = nil, &blk) 55 authorization(token, auth_header_type: "Bearer", &blk) 56 end
reset_auth_header_value!()
[show source]
# File lib/httpx/plugins/auth.rb 65 def reset_auth_header_value! 66 @auth_header_value = nil 67 end
skip_auth_header()
[show source]
# File lib/httpx/plugins/auth.rb 58 def skip_auth_header 59 @skip_auth_header_value = true 60 yield 61 ensure 62 @skip_auth_header_value = false 63 end