File tree 2 files changed +3
-15
lines changed
2 files changed +3
-15
lines changed Original file line number Diff line number Diff line change 8
8
module Passage
9
9
# The Passage::Auth class provides methods for authenticating requests and tokens
10
10
class Auth
11
- def initialize ( app_id , api_key , auth_strategy )
12
- @app_cache = ActiveSupport ::Cache ::MemoryStore . new
11
+ def initialize ( app_id :, req_opts :)
13
12
@app_id = app_id
14
- @api_key = api_key
15
- @auth_strategy = auth_strategy
13
+ @req_opts = req_opts
16
14
15
+ @app_cache = ActiveSupport ::Cache ::MemoryStore . new
17
16
fetch_jwks
18
17
19
- header_params = { 'Passage-Version' => "passage-ruby #{ Passage ::VERSION } " }
20
- header_params [ 'Authorization' ] = "Bearer #{ @api_key } " if @api_key != ''
21
-
22
- @req_opts = { }
23
- @req_opts [ :header_params ] = header_params
24
- @req_opts [ :debug_auth_names ] = [ 'header' ]
25
-
26
- @tokens_client = OpenapiClient ::TokensApi . new
27
18
@magic_links_client = OpenapiClient ::MagicLinksApi . new
28
19
end
29
20
Original file line number Diff line number Diff line change 5
5
require_relative 'version'
6
6
7
7
module Passage
8
- COOKIE_STRATEGY = 0
9
- HEADER_STRATEGY = 1
10
-
11
8
EMAIL_CHANNEL = 'email'
12
9
PHONE_CHANNEL = 'phone'
13
10
You can’t perform that action at this time.
0 commit comments