stytch 10.23.0 → 10.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/stytch/b2b_client.rb +3 -1
- data/lib/stytch/client.rb +3 -1
- data/lib/stytch/connected_apps.rb +372 -0
- data/lib/stytch/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb709fad85473f219b4bf2d15da9c8381b117ba31a3f9dd3393a338ec1583323
|
4
|
+
data.tar.gz: 1d59d330089fe207f936e80950a00ab0f1152d3f08c2a62db2df864fe4972408
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 015bffaf59b053a43f58d5ab48f245bc24f7ba623ae498a6bcca502ed6023d278e03023154ddb4eb1d269386488831ccc03d30f0ed028817fe7b355e4df006ab
|
7
|
+
data.tar.gz: c5c4bd35f7da7a88da844c470238c6ec3c26dcc3e4ce3abfe874a9e936066b617cee4685019745b71a5ce969be35ab21a287245c1b9f93fcaa0602986980e15d
|
data/lib/stytch/b2b_client.rb
CHANGED
@@ -13,6 +13,7 @@ require_relative 'b2b_scim'
|
|
13
13
|
require_relative 'b2b_sessions'
|
14
14
|
require_relative 'b2b_sso'
|
15
15
|
require_relative 'b2b_totps'
|
16
|
+
require_relative 'connected_apps'
|
16
17
|
require_relative 'fraud'
|
17
18
|
require_relative 'm2m'
|
18
19
|
require_relative 'project'
|
@@ -22,7 +23,7 @@ module StytchB2B
|
|
22
23
|
class Client
|
23
24
|
ENVIRONMENTS = %i[live test].freeze
|
24
25
|
|
25
|
-
attr_reader :discovery, :fraud, :impersonation, :m2m, :magic_links, :oauth, :otps, :organizations, :passwords, :project, :rbac, :recovery_codes, :scim, :sso, :sessions, :totps
|
26
|
+
attr_reader :connected_app, :discovery, :fraud, :impersonation, :m2m, :magic_links, :oauth, :otps, :organizations, :passwords, :project, :rbac, :recovery_codes, :scim, :sso, :sessions, :totps
|
26
27
|
|
27
28
|
def initialize(project_id:, secret:, env: nil, fraud_env: nil, &block)
|
28
29
|
@api_host = api_host(env, project_id)
|
@@ -36,6 +37,7 @@ module StytchB2B
|
|
36
37
|
rbac = StytchB2B::RBAC.new(@connection)
|
37
38
|
@policy_cache = StytchB2B::PolicyCache.new(rbac_client: rbac)
|
38
39
|
|
40
|
+
@connected_app = Stytch::ConnectedApp.new(@connection)
|
39
41
|
@discovery = StytchB2B::Discovery.new(@connection)
|
40
42
|
@fraud = Stytch::Fraud.new(@fraud_connection)
|
41
43
|
@impersonation = StytchB2B::Impersonation.new(@connection)
|
data/lib/stytch/client.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative 'connected_apps'
|
3
4
|
require_relative 'crypto_wallets'
|
4
5
|
require_relative 'fraud'
|
5
6
|
require_relative 'impersonation'
|
@@ -18,7 +19,7 @@ module Stytch
|
|
18
19
|
class Client
|
19
20
|
ENVIRONMENTS = %i[live test].freeze
|
20
21
|
|
21
|
-
attr_reader :crypto_wallets, :fraud, :impersonation, :m2m, :magic_links, :oauth, :otps, :passwords, :project, :sessions, :totps, :users, :webauthn
|
22
|
+
attr_reader :connected_app, :crypto_wallets, :fraud, :impersonation, :m2m, :magic_links, :oauth, :otps, :passwords, :project, :sessions, :totps, :users, :webauthn
|
22
23
|
|
23
24
|
def initialize(project_id:, secret:, env: nil, fraud_env: nil, &block)
|
24
25
|
@api_host = api_host(env, project_id)
|
@@ -29,6 +30,7 @@ module Stytch
|
|
29
30
|
|
30
31
|
create_connection(&block)
|
31
32
|
|
33
|
+
@connected_app = Stytch::ConnectedApp.new(@connection)
|
32
34
|
@crypto_wallets = Stytch::CryptoWallets.new(@connection)
|
33
35
|
@fraud = Stytch::Fraud.new(@fraud_connection)
|
34
36
|
@impersonation = Stytch::Impersonation.new(@connection)
|
@@ -0,0 +1,372 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# !!!
|
4
|
+
# WARNING: This file is autogenerated
|
5
|
+
# Only modify code within MANUAL() sections
|
6
|
+
# or your changes may be overwritten later!
|
7
|
+
# !!!
|
8
|
+
|
9
|
+
require_relative 'request_helper'
|
10
|
+
|
11
|
+
module Stytch
|
12
|
+
class ConnectedApp
|
13
|
+
include Stytch::RequestHelper
|
14
|
+
attr_reader :clients
|
15
|
+
|
16
|
+
def initialize(connection)
|
17
|
+
@connection = connection
|
18
|
+
|
19
|
+
@clients = Stytch::ConnectedApp::Clients.new(@connection)
|
20
|
+
end
|
21
|
+
|
22
|
+
class Clients
|
23
|
+
include Stytch::RequestHelper
|
24
|
+
attr_reader :secrets
|
25
|
+
|
26
|
+
def initialize(connection)
|
27
|
+
@connection = connection
|
28
|
+
|
29
|
+
@secrets = Stytch::ConnectedApp::Clients::Secrets.new(@connection)
|
30
|
+
end
|
31
|
+
|
32
|
+
# Retrieve details of a specific Connected App by `client_id`.
|
33
|
+
#
|
34
|
+
# == Parameters:
|
35
|
+
# client_id::
|
36
|
+
# The ID of the Connected App client.
|
37
|
+
# The type of this field is +String+.
|
38
|
+
#
|
39
|
+
# == Returns:
|
40
|
+
# An object with the following fields:
|
41
|
+
# request_id::
|
42
|
+
# Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
|
43
|
+
# The type of this field is +String+.
|
44
|
+
# connected_app::
|
45
|
+
# The Connected App affected by this operation.
|
46
|
+
# The type of this field is +ConnectedApp+ (+object+).
|
47
|
+
# status_code::
|
48
|
+
# The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
|
49
|
+
# The type of this field is +Integer+.
|
50
|
+
def get(
|
51
|
+
client_id:
|
52
|
+
)
|
53
|
+
headers = {}
|
54
|
+
query_params = {}
|
55
|
+
request = request_with_query_params("/v1/connected_apps/clients/#{client_id}", query_params)
|
56
|
+
get_request(request, headers)
|
57
|
+
end
|
58
|
+
|
59
|
+
# Updates mutable fields of a Connected App. Cannot update Client Type, Client ID, or Secrets.
|
60
|
+
#
|
61
|
+
# == Parameters:
|
62
|
+
# client_id::
|
63
|
+
# The ID of the client.
|
64
|
+
# The type of this field is +String+.
|
65
|
+
# client_name::
|
66
|
+
# A human-readable name for the client.
|
67
|
+
# The type of this field is nilable +String+.
|
68
|
+
# client_description::
|
69
|
+
# A human-readable description for the client.
|
70
|
+
# The type of this field is nilable +String+.
|
71
|
+
# redirect_urls::
|
72
|
+
# Array of redirect URI values for use in OAuth Authorization flows.
|
73
|
+
# The type of this field is nilable list of +String+.
|
74
|
+
# full_access_allowed::
|
75
|
+
# Valid for first party clients only. If `true`, an authorization token granted to this Client can be exchanged for a full Stytch session.
|
76
|
+
# The type of this field is nilable +Boolean+.
|
77
|
+
# access_token_expiry_minutes::
|
78
|
+
# The number of minutes before the access token expires. The default is 60 minutes.
|
79
|
+
# The type of this field is nilable +Integer+.
|
80
|
+
# access_token_custom_audience::
|
81
|
+
# The custom audience for the access token.
|
82
|
+
# The type of this field is nilable +String+.
|
83
|
+
# access_token_template_content::
|
84
|
+
# The content of the access token custom claims template. The template must be a valid JSON object.
|
85
|
+
# The type of this field is nilable +String+.
|
86
|
+
# post_logout_redirect_urls::
|
87
|
+
# Array of redirect URI values for use in OIDC Logout flows.
|
88
|
+
# The type of this field is nilable list of +String+.
|
89
|
+
# logo_url::
|
90
|
+
# The logo URL of the Connected App, if any.
|
91
|
+
# The type of this field is nilable +String+.
|
92
|
+
# bypass_consent_for_offline_access::
|
93
|
+
# Valid for first party clients only. If true, the client does not need to request explicit user consent for the `offline_access` scope.
|
94
|
+
# The type of this field is nilable +Boolean+.
|
95
|
+
#
|
96
|
+
# == Returns:
|
97
|
+
# An object with the following fields:
|
98
|
+
# request_id::
|
99
|
+
# Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
|
100
|
+
# The type of this field is +String+.
|
101
|
+
# connected_app::
|
102
|
+
# The Connected App affected by this operation.
|
103
|
+
# The type of this field is +ConnectedApp+ (+object+).
|
104
|
+
# status_code::
|
105
|
+
# The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
|
106
|
+
# The type of this field is +Integer+.
|
107
|
+
def update(
|
108
|
+
client_id:,
|
109
|
+
client_name: nil,
|
110
|
+
client_description: nil,
|
111
|
+
redirect_urls: nil,
|
112
|
+
full_access_allowed: nil,
|
113
|
+
access_token_expiry_minutes: nil,
|
114
|
+
access_token_custom_audience: nil,
|
115
|
+
access_token_template_content: nil,
|
116
|
+
post_logout_redirect_urls: nil,
|
117
|
+
logo_url: nil,
|
118
|
+
bypass_consent_for_offline_access: nil
|
119
|
+
)
|
120
|
+
headers = {}
|
121
|
+
request = {}
|
122
|
+
request[:client_name] = client_name unless client_name.nil?
|
123
|
+
request[:client_description] = client_description unless client_description.nil?
|
124
|
+
request[:redirect_urls] = redirect_urls unless redirect_urls.nil?
|
125
|
+
request[:full_access_allowed] = full_access_allowed unless full_access_allowed.nil?
|
126
|
+
request[:access_token_expiry_minutes] = access_token_expiry_minutes unless access_token_expiry_minutes.nil?
|
127
|
+
request[:access_token_custom_audience] = access_token_custom_audience unless access_token_custom_audience.nil?
|
128
|
+
request[:access_token_template_content] = access_token_template_content unless access_token_template_content.nil?
|
129
|
+
request[:post_logout_redirect_urls] = post_logout_redirect_urls unless post_logout_redirect_urls.nil?
|
130
|
+
request[:logo_url] = logo_url unless logo_url.nil?
|
131
|
+
request[:bypass_consent_for_offline_access] = bypass_consent_for_offline_access unless bypass_consent_for_offline_access.nil?
|
132
|
+
|
133
|
+
put_request("/v1/connected_apps/clients/#{client_id}", request, headers)
|
134
|
+
end
|
135
|
+
|
136
|
+
# Deletes a Connected App.
|
137
|
+
#
|
138
|
+
# == Parameters:
|
139
|
+
# client_id::
|
140
|
+
# The ID of the client.
|
141
|
+
# The type of this field is +String+.
|
142
|
+
#
|
143
|
+
# == Returns:
|
144
|
+
# An object with the following fields:
|
145
|
+
# request_id::
|
146
|
+
# (no documentation yet)
|
147
|
+
# The type of this field is +String+.
|
148
|
+
# client_id::
|
149
|
+
# The ID of the client.
|
150
|
+
# The type of this field is +String+.
|
151
|
+
# status_code::
|
152
|
+
# (no documentation yet)
|
153
|
+
# The type of this field is +Integer+.
|
154
|
+
def delete(
|
155
|
+
client_id:
|
156
|
+
)
|
157
|
+
headers = {}
|
158
|
+
delete_request("/v1/connected_apps/clients/#{client_id}", headers)
|
159
|
+
end
|
160
|
+
|
161
|
+
# Search for Connected Apps. Supports cursor-based pagination. Specific filters coming soon.
|
162
|
+
#
|
163
|
+
# == Parameters:
|
164
|
+
# cursor::
|
165
|
+
# The `cursor` field allows you to paginate through your results. Each result array is limited to 1000 results. If your query returns more than 1000 results, you will need to paginate the responses using the `cursor`. If you receive a response that includes a non-null `next_cursor` in the `results_metadata` object, repeat the search call with the `next_cursor` value set to the `cursor` field to retrieve the next page of results. Continue to make search calls until the `next_cursor` in the response is null.
|
166
|
+
# The type of this field is nilable +String+.
|
167
|
+
# limit::
|
168
|
+
# The number of search results to return per page. The default limit is 100. A maximum of 1000 results can be returned by a single search request. If the total size of your result set is greater than one page size, you must paginate the response. See the `cursor` field.
|
169
|
+
# The type of this field is nilable +Integer+.
|
170
|
+
#
|
171
|
+
# == Returns:
|
172
|
+
# An object with the following fields:
|
173
|
+
# request_id::
|
174
|
+
# Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
|
175
|
+
# The type of this field is +String+.
|
176
|
+
# connected_apps::
|
177
|
+
# (no documentation yet)
|
178
|
+
# The type of this field is list of +ConnectedApp+ (+object+).
|
179
|
+
# results_metadata::
|
180
|
+
# The search `results_metadata` object contains metadata relevant to your specific query like total and `next_cursor`.
|
181
|
+
# The type of this field is +ResultsMetadata+ (+object+).
|
182
|
+
# status_code::
|
183
|
+
# The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
|
184
|
+
# The type of this field is +Integer+.
|
185
|
+
def search(
|
186
|
+
cursor: nil,
|
187
|
+
limit: nil
|
188
|
+
)
|
189
|
+
headers = {}
|
190
|
+
request = {}
|
191
|
+
request[:cursor] = cursor unless cursor.nil?
|
192
|
+
request[:limit] = limit unless limit.nil?
|
193
|
+
|
194
|
+
post_request('/v1/connected_apps/clients/search', request, headers)
|
195
|
+
end
|
196
|
+
|
197
|
+
# Creates a new Connected App. If the Connected App `client_type` is `first_party` or `third_party` a `client_secret` is returned.
|
198
|
+
#
|
199
|
+
# **Important:** This is the only time you will be able to view the generated `client_secret` in the API response. Stytch stores a hash of the `client_secret` and cannot recover the value if lost. Be sure to persist the `client_secret` in a secure location. If the `client_secret` is lost, you will need to trigger a secret rotation flow to receive another one.
|
200
|
+
#
|
201
|
+
# == Parameters:
|
202
|
+
# client_type::
|
203
|
+
# The type of Connected App. Supported values are `first_party`, `first_party_public`, `third_party`, and `third_party_public`.
|
204
|
+
# The type of this field is +CreateRequestClientType+ (string enum).
|
205
|
+
# redirect_urls::
|
206
|
+
# Array of redirect URI values for use in OAuth Authorization flows.
|
207
|
+
# The type of this field is list of +String+.
|
208
|
+
# full_access_allowed::
|
209
|
+
# Valid for first party clients only. If `true`, an authorization token granted to this Client can be exchanged for a full Stytch session.
|
210
|
+
# The type of this field is +Boolean+.
|
211
|
+
# post_logout_redirect_urls::
|
212
|
+
# Array of redirect URI values for use in OIDC Logout flows.
|
213
|
+
# The type of this field is list of +String+.
|
214
|
+
# client_name::
|
215
|
+
# A human-readable name for the client.
|
216
|
+
# The type of this field is nilable +String+.
|
217
|
+
# client_description::
|
218
|
+
# A human-readable description for the client.
|
219
|
+
# The type of this field is nilable +String+.
|
220
|
+
# access_token_expiry_minutes::
|
221
|
+
# The number of minutes before the access token expires. The default is 60 minutes.
|
222
|
+
# The type of this field is nilable +Integer+.
|
223
|
+
# access_token_custom_audience::
|
224
|
+
# The custom audience for the access token.
|
225
|
+
# The type of this field is nilable +String+.
|
226
|
+
# access_token_template_content::
|
227
|
+
# The content of the access token custom claims template. The template must be a valid JSON object.
|
228
|
+
# The type of this field is nilable +String+.
|
229
|
+
# logo_url::
|
230
|
+
# The logo URL of the Connected App, if any.
|
231
|
+
# The type of this field is nilable +String+.
|
232
|
+
# bypass_consent_for_offline_access::
|
233
|
+
# Valid for first party clients only. If true, the client does not need to request explicit user consent for the `offline_access` scope.
|
234
|
+
# The type of this field is nilable +Boolean+.
|
235
|
+
#
|
236
|
+
# == Returns:
|
237
|
+
# An object with the following fields:
|
238
|
+
# request_id::
|
239
|
+
# Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
|
240
|
+
# The type of this field is +String+.
|
241
|
+
# connected_app::
|
242
|
+
# The Connected App created by this API call.
|
243
|
+
# The type of this field is +ConnectedAppWithClientSecret+ (+object+).
|
244
|
+
# status_code::
|
245
|
+
# The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
|
246
|
+
# The type of this field is +Integer+.
|
247
|
+
def create(
|
248
|
+
client_type:,
|
249
|
+
redirect_urls:,
|
250
|
+
full_access_allowed:,
|
251
|
+
post_logout_redirect_urls:,
|
252
|
+
client_name: nil,
|
253
|
+
client_description: nil,
|
254
|
+
access_token_expiry_minutes: nil,
|
255
|
+
access_token_custom_audience: nil,
|
256
|
+
access_token_template_content: nil,
|
257
|
+
logo_url: nil,
|
258
|
+
bypass_consent_for_offline_access: nil
|
259
|
+
)
|
260
|
+
headers = {}
|
261
|
+
request = {
|
262
|
+
client_type: client_type,
|
263
|
+
redirect_urls: redirect_urls,
|
264
|
+
full_access_allowed: full_access_allowed,
|
265
|
+
post_logout_redirect_urls: post_logout_redirect_urls
|
266
|
+
}
|
267
|
+
request[:client_name] = client_name unless client_name.nil?
|
268
|
+
request[:client_description] = client_description unless client_description.nil?
|
269
|
+
request[:access_token_expiry_minutes] = access_token_expiry_minutes unless access_token_expiry_minutes.nil?
|
270
|
+
request[:access_token_custom_audience] = access_token_custom_audience unless access_token_custom_audience.nil?
|
271
|
+
request[:access_token_template_content] = access_token_template_content unless access_token_template_content.nil?
|
272
|
+
request[:logo_url] = logo_url unless logo_url.nil?
|
273
|
+
request[:bypass_consent_for_offline_access] = bypass_consent_for_offline_access unless bypass_consent_for_offline_access.nil?
|
274
|
+
|
275
|
+
post_request('/v1/connected_apps/clients', request, headers)
|
276
|
+
end
|
277
|
+
|
278
|
+
class Secrets
|
279
|
+
include Stytch::RequestHelper
|
280
|
+
|
281
|
+
def initialize(connection)
|
282
|
+
@connection = connection
|
283
|
+
end
|
284
|
+
|
285
|
+
# Initiate the rotation of a Connected App client secret. After this endpoint is called, both the client's `client_secret` and `next_client_secret` will be valid. To complete the secret rotation flow, update all usages of `client_secret` to `next_client_secret` and call the Rotate Secret Endpoint to complete the flow.
|
286
|
+
# Secret rotation can be cancelled using the Cancel Secret Rotation endpoint.
|
287
|
+
#
|
288
|
+
# **Important:** This is the only time you will be able to view the generated `next_client_secret` in the API response. Stytch stores a hash of the `next_client_secret` and cannot recover the value if lost. Be sure to persist the `next_client_secret` in a secure location. If the `next_client_secret` is lost, you will need to trigger a secret rotation flow to receive another one.
|
289
|
+
#
|
290
|
+
# == Parameters:
|
291
|
+
# client_id::
|
292
|
+
# The ID of the client.
|
293
|
+
# The type of this field is +String+.
|
294
|
+
#
|
295
|
+
# == Returns:
|
296
|
+
# An object with the following fields:
|
297
|
+
# request_id::
|
298
|
+
# Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
|
299
|
+
# The type of this field is +String+.
|
300
|
+
# connected_app::
|
301
|
+
# The Connected App affected by this operation.
|
302
|
+
# The type of this field is +ConnectedAppWithNextClientSecret+ (+object+).
|
303
|
+
# status_code::
|
304
|
+
# The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
|
305
|
+
# The type of this field is +Integer+.
|
306
|
+
def rotate_start(
|
307
|
+
client_id:
|
308
|
+
)
|
309
|
+
headers = {}
|
310
|
+
request = {}
|
311
|
+
|
312
|
+
post_request("/v1/connected_apps/clients/#{client_id}/secrets/rotate/start", request, headers)
|
313
|
+
end
|
314
|
+
|
315
|
+
# Cancel the rotation of a Connected App client secret started with the Start Secret Rotation Endpoint. After this endpoint is called, the client's `next_client_secret` is discarded and only the original `client_secret` will be valid.
|
316
|
+
#
|
317
|
+
# == Parameters:
|
318
|
+
# client_id::
|
319
|
+
# The ID of the client.
|
320
|
+
# The type of this field is +String+.
|
321
|
+
#
|
322
|
+
# == Returns:
|
323
|
+
# An object with the following fields:
|
324
|
+
# request_id::
|
325
|
+
# Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
|
326
|
+
# The type of this field is +String+.
|
327
|
+
# connected_app::
|
328
|
+
# The Connected App affected by this operation.
|
329
|
+
# The type of this field is +ConnectedApp+ (+object+).
|
330
|
+
# status_code::
|
331
|
+
# The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
|
332
|
+
# The type of this field is +Integer+.
|
333
|
+
def rotate_cancel(
|
334
|
+
client_id:
|
335
|
+
)
|
336
|
+
headers = {}
|
337
|
+
request = {}
|
338
|
+
|
339
|
+
post_request("/v1/connected_apps/clients/#{client_id}/secrets/rotate/cancel", request, headers)
|
340
|
+
end
|
341
|
+
|
342
|
+
# Complete the rotation of a Connected App client secret started with the Rotate Secret Start Endpoint.
|
343
|
+
# After this endpoint is called, the client's `next_client_secret` becomes its `client_secret` and the previous `client_secret` will no longer be valid.
|
344
|
+
#
|
345
|
+
# == Parameters:
|
346
|
+
# client_id::
|
347
|
+
# The ID of the client.
|
348
|
+
# The type of this field is +String+.
|
349
|
+
#
|
350
|
+
# == Returns:
|
351
|
+
# An object with the following fields:
|
352
|
+
# request_id::
|
353
|
+
# Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
|
354
|
+
# The type of this field is +String+.
|
355
|
+
# connected_app::
|
356
|
+
# The Connected App affected by this operation.
|
357
|
+
# The type of this field is +ConnectedApp+ (+object+).
|
358
|
+
# status_code::
|
359
|
+
# The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
|
360
|
+
# The type of this field is +Integer+.
|
361
|
+
def rotate(
|
362
|
+
client_id:
|
363
|
+
)
|
364
|
+
headers = {}
|
365
|
+
request = {}
|
366
|
+
|
367
|
+
post_request("/v1/connected_apps/clients/#{client_id}/secrets/rotate", request, headers)
|
368
|
+
end
|
369
|
+
end
|
370
|
+
end
|
371
|
+
end
|
372
|
+
end
|
data/lib/stytch/version.rb
CHANGED
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: 10.
|
4
|
+
version: 10.24.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- stytch
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -139,6 +139,7 @@ files:
|
|
139
139
|
- lib/stytch/b2b_sso.rb
|
140
140
|
- lib/stytch/b2b_totps.rb
|
141
141
|
- lib/stytch/client.rb
|
142
|
+
- lib/stytch/connected_apps.rb
|
142
143
|
- lib/stytch/crypto_wallets.rb
|
143
144
|
- lib/stytch/errors.rb
|
144
145
|
- lib/stytch/fraud.rb
|