stytch 3.4.0 → 3.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4e0b5abf60607192bc55481b147a61900f775de4446bb484469a7e9f46ad9eb
4
- data.tar.gz: 997294b0104b0fc95002e2e05f373f69b9fb98b91f1767844eb4bdb8792a527d
3
+ metadata.gz: e14a2ef2166355c60c94db8b352690af8f307c1b5dad77309d662d9bab0f0838
4
+ data.tar.gz: 2ab96922302d86fda507b7ab12ad205106ee345adf1c0a88553a8930f286b9fc
5
5
  SHA512:
6
- metadata.gz: 9697278039c4a8ab9274f20a89b12f05d07afb7902621b523bbeec20865a72d513aeb3c3aeb360be59e9aec949bdca2d36e2dd6024bc16886db8296759be69f9
7
- data.tar.gz: 8ebdc8a2af442ec66779ed9014f9605f0e40b04ef292f8933379010b3bb3bffad3ab32b5cc1e70e09c695b8e82b45cb583ab3282fb86d01d8640177d7b82e1f4
6
+ metadata.gz: 22569e30740820e2f3e05e960484d1d846ea6bf2f6b88dfa36e17b9ec8e2bbd90933357995370188fe79864909f4d777b526c12816029c5382ba3632553e91eb
7
+ data.tar.gz: 17c64f8bcc4374caae275fd83a6d2e2d02142b918cd428abb00298b58f7d46dbecca1fe1d3ca2bc9c69ca3f7c102f57d2f81f9d42dbf1e90c0ae4388f45c6723
@@ -33,7 +33,8 @@ module Stytch
33
33
  signature:,
34
34
  session_token: nil,
35
35
  session_jwt: nil,
36
- session_duration_minutes: nil
36
+ session_duration_minutes: nil,
37
+ session_custom_claims: nil
37
38
  )
38
39
  request = {
39
40
  crypto_wallet_address: crypto_wallet_address,
@@ -44,6 +45,7 @@ module Stytch
44
45
  request[:session_token] = session_token unless session_token.nil?
45
46
  request[:session_jwt] = session_jwt unless session_jwt.nil?
46
47
  request[:session_duration_minutes] = session_duration_minutes unless session_duration_minutes.nil?
48
+ request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
47
49
 
48
50
  post_request("#{PATH}/authenticate", request)
49
51
  end
@@ -38,6 +38,7 @@ module Stytch
38
38
  session_token: nil,
39
39
  session_jwt: nil,
40
40
  session_duration_minutes: nil,
41
+ session_custom_claims: nil,
41
42
  code_verifier: nil
42
43
  )
43
44
  request = {
@@ -49,6 +50,7 @@ module Stytch
49
50
  request[:session_token] = session_token unless session_token.nil?
50
51
  request[:session_jwt] = session_jwt unless session_jwt.nil?
51
52
  request[:session_duration_minutes] = session_duration_minutes unless session_duration_minutes.nil?
53
+ request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
52
54
  request[:code_verifier] = code_verifier unless code_verifier.nil?
53
55
 
54
56
  post_request("#{PATH}/authenticate", request)
data/lib/stytch/oauth.rb CHANGED
@@ -17,6 +17,7 @@ module Stytch
17
17
  session_token: nil,
18
18
  session_jwt: nil,
19
19
  session_duration_minutes: nil,
20
+ session_custom_claims: nil,
20
21
  code_verifier: nil
21
22
  )
22
23
  request = {
@@ -25,6 +26,7 @@ module Stytch
25
26
  request[:session_token] = session_token unless session_token.nil?
26
27
  request[:session_jwt] = session_jwt unless session_jwt.nil?
27
28
  request[:session_duration_minutes] = session_duration_minutes unless session_duration_minutes.nil?
29
+ request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
28
30
  request[:code_verifier] = code_verifier unless code_verifier.nil?
29
31
 
30
32
  post_request("#{PATH}/authenticate", request)
data/lib/stytch/otps.rb CHANGED
@@ -25,7 +25,8 @@ module Stytch
25
25
  options: {},
26
26
  session_token: nil,
27
27
  session_jwt: nil,
28
- session_duration_minutes: nil
28
+ session_duration_minutes: nil,
29
+ session_custom_claims: nil
29
30
  )
30
31
  request = {
31
32
  method_id: method_id,
@@ -37,6 +38,7 @@ module Stytch
37
38
  request[:session_token] = session_token unless session_token.nil?
38
39
  request[:session_jwt] = session_jwt unless session_jwt.nil?
39
40
  request[:session_duration_minutes] = session_duration_minutes unless session_duration_minutes.nil?
41
+ request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
40
42
 
41
43
  post_request("#{PATH}/authenticate", request)
42
44
  end
@@ -33,13 +33,15 @@ module Stytch
33
33
  def authenticate(
34
34
  session_token: nil,
35
35
  session_jwt: nil,
36
- session_duration_minutes: nil
36
+ session_duration_minutes: nil,
37
+ session_custom_claims: nil
37
38
  )
38
39
  request = {}
39
40
 
40
41
  request[:session_token] = session_token unless session_token.nil?
41
42
  request[:session_jwt] = session_jwt unless session_jwt.nil?
42
43
  request[:session_duration_minutes] = session_duration_minutes unless session_duration_minutes.nil?
44
+ request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
43
45
 
44
46
  post_request("#{PATH}/authenticate", request)
45
47
  end
@@ -68,12 +70,14 @@ module Stytch
68
70
  def authenticate_jwt(
69
71
  session_jwt,
70
72
  max_token_age_seconds: nil,
71
- session_duration_minutes: nil
73
+ session_duration_minutes: nil,
74
+ session_custom_claims: nil
72
75
  )
73
76
  if max_token_age_seconds == 0
74
77
  return authenticate(
75
78
  session_jwt: session_jwt,
76
79
  session_duration_minutes: session_duration_minutes,
80
+ session_custom_claims: session_custom_claims,
77
81
  )
78
82
  end
79
83
 
@@ -86,6 +90,7 @@ module Stytch
86
90
  return authenticate(
87
91
  session_jwt: session_jwt,
88
92
  session_duration_minutes: session_duration_minutes,
93
+ session_custom_claims: session_custom_claims,
89
94
  )
90
95
  end
91
96
  rescue StandardError
@@ -93,6 +98,7 @@ module Stytch
93
98
  return authenticate(
94
99
  session_jwt: session_jwt,
95
100
  session_duration_minutes: session_duration_minutes,
101
+ session_custom_claims: session_custom_claims,
96
102
  )
97
103
  end
98
104
 
data/lib/stytch/totps.rb CHANGED
@@ -30,7 +30,8 @@ module Stytch
30
30
  totp_code:,
31
31
  session_token: nil,
32
32
  session_jwt: nil,
33
- session_duration_minutes: nil
33
+ session_duration_minutes: nil,
34
+ session_custom_claims: nil
34
35
  )
35
36
  request = {
36
37
  user_id: user_id,
@@ -40,6 +41,7 @@ module Stytch
40
41
  request[:session_token] = session_token unless session_token.nil?
41
42
  request[:session_jwt] = session_jwt unless session_jwt.nil?
42
43
  request[:session_duration_minutes] = session_duration_minutes unless session_duration_minutes.nil?
44
+ request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
43
45
 
44
46
  post_request("#{PATH}/authenticate", request)
45
47
  end
@@ -59,7 +61,8 @@ module Stytch
59
61
  recovery_code:,
60
62
  session_token: nil,
61
63
  session_jwt: nil,
62
- session_duration_minutes: nil
64
+ session_duration_minutes: nil,
65
+ session_custom_claims: nil
63
66
  )
64
67
  request = {
65
68
  user_id: user_id,
@@ -69,6 +72,7 @@ module Stytch
69
72
  request[:session_token] = session_token unless session_token.nil?
70
73
  request[:session_jwt] = session_jwt unless session_jwt.nil?
71
74
  request[:session_duration_minutes] = session_duration_minutes unless session_duration_minutes.nil?
75
+ request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
72
76
 
73
77
  post_request("#{PATH}/recover", request)
74
78
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stytch
4
- VERSION = '3.4.0'
4
+ VERSION = '3.5.0'
5
5
  end
@@ -57,7 +57,8 @@ module Stytch
57
57
  public_key_credential:,
58
58
  session_token: nil,
59
59
  session_jwt: nil,
60
- session_duration_minutes: nil
60
+ session_duration_minutes: nil,
61
+ session_custom_claims: nil
61
62
  )
62
63
  request = {
63
64
  public_key_credential: public_key_credential
@@ -66,6 +67,7 @@ module Stytch
66
67
  request[:session_token] = session_token unless session_token.nil?
67
68
  request[:session_jwt] = session_jwt unless session_jwt.nil?
68
69
  request[:session_duration_minutes] = session_duration_minutes unless session_duration_minutes.nil?
70
+ request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
69
71
 
70
72
  post_request("#{PATH}/authenticate", request)
71
73
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stytch
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0
4
+ version: 3.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - stytch
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-08 00:00:00.000000000 Z
11
+ date: 2022-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -92,7 +92,7 @@ dependencies:
92
92
  - - ">="
93
93
  - !ruby/object:Gem::Version
94
94
  version: 3.5.3
95
- description:
95
+ description:
96
96
  email:
97
97
  - support@stytch.com
98
98
  executables: []
@@ -132,7 +132,7 @@ licenses:
132
132
  metadata:
133
133
  homepage_uri: https://stytch.com
134
134
  source_code_uri: https://github.com/stytchauth/stytch-ruby
135
- post_install_message:
135
+ post_install_message:
136
136
  rdoc_options: []
137
137
  require_paths:
138
138
  - lib
@@ -147,8 +147,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  - !ruby/object:Gem::Version
148
148
  version: '0'
149
149
  requirements: []
150
- rubygems_version: 3.1.6
151
- signing_key:
150
+ rubygems_version: 3.0.3
151
+ signing_key:
152
152
  specification_version: 4
153
153
  summary: Stytch Ruby Gem
154
154
  test_files: []