Skip to content

Commit f52df8b

Browse files
authored
Fixed Faraday::Connection#token_auth, Faraday 2.0 - deprecated warning. (#13)
* Fixed Faraday::Connection#token_auth, Faraday 2.0 - deprecated warning. * Fixed basic_auth method.
1 parent eb38dcc commit f52df8b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/zammad_api/transport.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ def initialize(config, logger)
1616
end
1717
@conn.headers[:user_agent] = 'Zammad API Ruby'
1818
if config[:http_token] && !config[:http_token].empty?
19-
@conn.token_auth(config[:http_token])
19+
@conn.request :authorization, 'Token', config[:http_token]
2020
elsif config[:oauth2_token] && !config[:oauth2_token].empty?
21-
@conn.authorization :Bearer, config[:oauth2_token]
21+
@conn.request :authorization, 'Bearer', config[:oauth2_token]
2222
else
23-
@conn.basic_auth(config[:user], config[:password])
23+
@conn.request :basic_auth, config[:user], config[:password]
2424
end
2525
end
2626

0 commit comments

Comments
 (0)