File tree 1 file changed +5
-11
lines changed
1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -6,18 +6,13 @@ module Passage
6
6
# The UserAPI class provides methods for interacting with Passage Users
7
7
class UserAPI
8
8
# rubocop:disable Metrics/AbcSize
9
- def initialize ( app_id , api_key )
9
+ def initialize ( app_id : , req_opts : )
10
10
@app_id = app_id
11
- @api_key = api_key
11
+ @req_opts = req_opts
12
+
12
13
@user_client = OpenapiClient ::UsersApi . new
13
14
@user_device_client = OpenapiClient ::UserDevicesApi . new
14
-
15
- header_params = { 'Passage-Version' => "passage-ruby #{ Passage ::VERSION } " }
16
- header_params [ 'Authorization' ] = "Bearer #{ @api_key } " if @api_key != ''
17
-
18
- @req_opts = { }
19
- @req_opts [ :header_params ] = header_params
20
- @req_opts [ :debug_auth_names ] = [ 'header' ]
15
+ @tokens_client = OpenapiClient ::TokensApi . new
21
16
end
22
17
23
18
def get ( user_id :)
@@ -160,8 +155,7 @@ def revoke_refresh_tokens(user_id:)
160
155
raise ArgumentError , 'user_id is required.' unless user_id && !user_id . empty?
161
156
162
157
begin
163
- tokens_client = OpenapiClient ::TokensApi . new
164
- tokens_client . revoke_user_refresh_tokens ( @app_id , user_id , @req_opts )
158
+ @tokens_client . revoke_user_refresh_tokens ( @app_id , user_id , @req_opts )
165
159
rescue Faraday ::Error => e
166
160
raise PassageError . new (
167
161
status_code : e . response [ :status ] ,
You can’t perform that action at this time.
0 commit comments