stytch 10.22.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/b2b_impersonation.rb +1 -1
- data/lib/stytch/b2b_passwords.rb +8 -5
- data/lib/stytch/b2b_rbac.rb +2 -1
- data/lib/stytch/b2b_sessions.rb +90 -1
- data/lib/stytch/client.rb +3 -1
- data/lib/stytch/connected_apps.rb +372 -0
- data/lib/stytch/impersonation.rb +1 -1
- data/lib/stytch/passwords.rb +12 -7
- data/lib/stytch/sessions.rb +79 -0
- data/lib/stytch/version.rb +1 -1
- data/lib/stytch/webauthn.rb +6 -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)
|
@@ -19,7 +19,7 @@ module StytchB2B
|
|
19
19
|
# Authenticate an impersonation token to impersonate a. This endpoint requires an impersonation token that is not expired or previously used.
|
20
20
|
# A Stytch session will be created for the impersonated member with a 60 minute duration. Impersonated sessions cannot be extended.
|
21
21
|
#
|
22
|
-
# Prior to this step, you can generate an impersonation token by visiting the Stytch
|
22
|
+
# Prior to this step, you can generate an impersonation token by visiting the Stytch Dashboard, viewing a member, and clicking the `Impersonate Member` button.
|
23
23
|
#
|
24
24
|
# == Parameters:
|
25
25
|
# impersonation_token::
|
data/lib/stytch/b2b_passwords.rb
CHANGED
@@ -24,10 +24,13 @@ module StytchB2B
|
|
24
24
|
|
25
25
|
# This API allows you to check whether the user’s provided password is valid, and to provide feedback to the user on how to increase the strength of their password.
|
26
26
|
#
|
27
|
-
# This endpoint adapts to your Project's password strength configuration.
|
27
|
+
# This endpoint adapts to your Project's password strength configuration.
|
28
|
+
# If you're using [zxcvbn](https://stytch.com/docs/guides/passwords/strength-policy), the default, your passwords are considered valid if the strength score is >= 3.
|
29
|
+
# If you're using [LUDS](https://stytch.com/docs/guides/passwords/strength-policy), your passwords are considered valid if they meet the requirements that you've set with Stytch.
|
30
|
+
# You may update your password strength configuration on the [Passwords Policy page](https://stytch.com/dashboard/password-strength-config) in the Stytch Dashboard.
|
28
31
|
#
|
29
32
|
# ## Password feedback
|
30
|
-
# The zxcvbn_feedback and luds_feedback objects contains relevant fields for you to relay feedback to users that failed to create a strong enough password.
|
33
|
+
# The `zxcvbn_feedback` and `luds_feedback` objects contains relevant fields for you to relay feedback to users that failed to create a strong enough password.
|
31
34
|
#
|
32
35
|
# If you're using [zxcvbn](https://stytch.com/docs/guides/passwords/strength-policy), the feedback object will contain warning and suggestions for any password that does not meet the [zxcvbn](https://stytch.com/docs/guides/passwords/strength-policy) strength requirements. You can return these strings directly to the user to help them craft a strong password.
|
33
36
|
#
|
@@ -382,7 +385,7 @@ module StytchB2B
|
|
382
385
|
# If you're using [zxcvbn](https://stytch.com/docs/guides/passwords/strength-policy), the default, your passwords are considered valid
|
383
386
|
# if the strength score is >= 3. If you're using [LUDS](https://stytch.com/docs/guides/passwords/strength-policy), your passwords are
|
384
387
|
# considered valid if they meet the requirements that you've set with Stytch.
|
385
|
-
# You may update your password strength configuration
|
388
|
+
# You may update your password strength configuration on the [Passwords Policy page](https://stytch.com/dashboard/password-strength-config) in the Stytch Dashboard.
|
386
389
|
#
|
387
390
|
# == Parameters:
|
388
391
|
# organization_id::
|
@@ -774,7 +777,7 @@ module StytchB2B
|
|
774
777
|
# If you're using [zxcvbn](https://stytch.com/docs/guides/passwords/strength-policy), the default, your passwords are considered valid
|
775
778
|
# if the strength score is >= 3. If you're using [LUDS](https://stytch.com/docs/guides/passwords/strength-policy), your passwords are
|
776
779
|
# considered valid if they meet the requirements that you've set with Stytch.
|
777
|
-
# You may update your password strength configuration
|
780
|
+
# You may update your password strength configuration on the [Passwords Policy page](https://stytch.com/dashboard/password-strength-config) in the Stytch Dashboard.
|
778
781
|
#
|
779
782
|
# If the Member is required to complete MFA to log in to the Organization, the returned value of `member_authenticated` will be `false`, and an `intermediate_session_token` will be returned.
|
780
783
|
# The `intermediate_session_token` can be passed into the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete the MFA step and acquire a full member session.
|
@@ -976,7 +979,7 @@ module StytchB2B
|
|
976
979
|
# If you're using [zxcvbn](https://stytch.com/docs/guides/passwords/strength-policy), the default, your passwords are considered valid
|
977
980
|
# if the strength score is >= 3. If you're using [LUDS](https://stytch.com/docs/guides/passwords/strength-policy), your passwords are
|
978
981
|
# considered valid if they meet the requirements that you've set with Stytch.
|
979
|
-
# You may update your password strength configuration
|
982
|
+
# You may update your password strength configuration on the [Passwords Policy page](https://stytch.com/dashboard/password-strength-config) in the Stytch Dashboard.
|
980
983
|
#
|
981
984
|
# == Parameters:
|
982
985
|
# email_address::
|
data/lib/stytch/b2b_rbac.rb
CHANGED
@@ -20,7 +20,8 @@ module StytchB2B
|
|
20
20
|
#
|
21
21
|
# When using the backend SDKs, the RBAC Policy will be cached to allow for local evaluations, eliminating the need for an extra request to Stytch. The policy will be refreshed if an authorization check is requested and the RBAC policy was last updated more than 5 minutes ago.
|
22
22
|
#
|
23
|
-
# Resources and Roles can be created and managed within the [
|
23
|
+
# Resources and Roles can be created and managed within the [RBAC page](https://stytch.com/docs/dashboard/rbac) in the Dashboard.
|
24
|
+
# Additionally, [Role assignment](https://stytch.com/docs/b2b/guides/rbac/role-assignment) can be programmatically managed through certain Stytch API endpoints.
|
24
25
|
#
|
25
26
|
# Check out the [RBAC overview](https://stytch.com/docs/b2b/guides/rbac/overview) to learn more about Stytch's RBAC permissioning model.
|
26
27
|
#
|
data/lib/stytch/b2b_sessions.rb
CHANGED
@@ -417,7 +417,96 @@ module StytchB2B
|
|
417
417
|
post_request('/v1/b2b/sessions/exchange_access_token', request, headers)
|
418
418
|
end
|
419
419
|
|
420
|
-
#
|
420
|
+
# Exchange an auth token issued by a trusted identity provider for a Stytch session. You must first register a Trusted Auth Token profile in the Stytch dashboard [here](https://stytch.com/docs/dashboard/trusted-auth-tokens). If a session token or session JWT is provided, it will add the trusted auth token as an authentication factor to the existing session.
|
421
|
+
#
|
422
|
+
# == Parameters:
|
423
|
+
# organization_id::
|
424
|
+
# The organization ID that the session should be authenticated in.
|
425
|
+
# The type of this field is +String+.
|
426
|
+
# profile_id::
|
427
|
+
# The ID of the trusted auth token profile to use for attestation.
|
428
|
+
# The type of this field is +String+.
|
429
|
+
# token::
|
430
|
+
# The trusted auth token to authenticate.
|
431
|
+
# The type of this field is +String+.
|
432
|
+
# session_duration_minutes::
|
433
|
+
# Set the session lifetime to be this many minutes from now. This will start a new session if one doesn't already exist,
|
434
|
+
# returning both an opaque `session_token` and `session_jwt` for this session. Remember that the `session_jwt` will have a fixed lifetime of
|
435
|
+
# five minutes regardless of the underlying session duration, and will need to be refreshed over time.
|
436
|
+
#
|
437
|
+
# This value must be a minimum of 5 and a maximum of 527040 minutes (366 days).
|
438
|
+
#
|
439
|
+
# If a `session_token` or `session_jwt` is provided then a successful authentication will continue to extend the session this many minutes.
|
440
|
+
#
|
441
|
+
# If the `session_duration_minutes` parameter is not specified, a Stytch session will be created with a 60 minute duration. If you don't want
|
442
|
+
# to use the Stytch session product, you can ignore the session fields in the response.
|
443
|
+
# The type of this field is nilable +Integer+.
|
444
|
+
# session_custom_claims::
|
445
|
+
# Add a custom claims map to the Session being authenticated. Claims are only created if a Session is initialized by providing a value in
|
446
|
+
# `session_duration_minutes`. Claims will be included on the Session object and in the JWT. To update a key in an existing Session, supply a new value. To
|
447
|
+
# delete a key, supply a null value. Custom claims made with reserved claims (`iss`, `sub`, `aud`, `exp`, `nbf`, `iat`, `jti`) will be ignored.
|
448
|
+
# Total custom claims size cannot exceed four kilobytes.
|
449
|
+
# The type of this field is nilable +object+.
|
450
|
+
# session_token::
|
451
|
+
# The `session_token` for the session that you wish to add the trusted auth token authentication factor to.
|
452
|
+
# The type of this field is nilable +String+.
|
453
|
+
# session_jwt::
|
454
|
+
# The `session_jwt` for the session that you wish to add the trusted auth token authentication factor to.
|
455
|
+
# The type of this field is nilable +String+.
|
456
|
+
#
|
457
|
+
# == Returns:
|
458
|
+
# An object with the following fields:
|
459
|
+
# request_id::
|
460
|
+
# 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.
|
461
|
+
# The type of this field is +String+.
|
462
|
+
# member_id::
|
463
|
+
# Globally unique UUID that identifies a specific Member.
|
464
|
+
# The type of this field is +String+.
|
465
|
+
# member_session::
|
466
|
+
# The [Session object](https://stytch.com/docs/b2b/api/session-object).
|
467
|
+
# The type of this field is +MemberSession+ (+object+).
|
468
|
+
# session_token::
|
469
|
+
# A secret token for a given Stytch Session.
|
470
|
+
# The type of this field is +String+.
|
471
|
+
# session_jwt::
|
472
|
+
# The JSON Web Token (JWT) for a given Stytch Session.
|
473
|
+
# The type of this field is +String+.
|
474
|
+
# member::
|
475
|
+
# The [Member object](https://stytch.com/docs/b2b/api/member-object)
|
476
|
+
# The type of this field is +Member+ (+object+).
|
477
|
+
# organization::
|
478
|
+
# The [Organization object](https://stytch.com/docs/b2b/api/organization-object).
|
479
|
+
# The type of this field is +Organization+ (+object+).
|
480
|
+
# status_code::
|
481
|
+
# 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.
|
482
|
+
# The type of this field is +Integer+.
|
483
|
+
def attest(
|
484
|
+
organization_id:,
|
485
|
+
profile_id:,
|
486
|
+
token:,
|
487
|
+
session_duration_minutes: nil,
|
488
|
+
session_custom_claims: nil,
|
489
|
+
session_token: nil,
|
490
|
+
session_jwt: nil
|
491
|
+
)
|
492
|
+
headers = {}
|
493
|
+
request = {
|
494
|
+
organization_id: organization_id,
|
495
|
+
profile_id: profile_id,
|
496
|
+
token: token
|
497
|
+
}
|
498
|
+
request[:session_duration_minutes] = session_duration_minutes unless session_duration_minutes.nil?
|
499
|
+
request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
|
500
|
+
request[:session_token] = session_token unless session_token.nil?
|
501
|
+
request[:session_jwt] = session_jwt unless session_jwt.nil?
|
502
|
+
|
503
|
+
post_request('/v1/b2b/sessions/attest', request, headers)
|
504
|
+
end
|
505
|
+
|
506
|
+
# Migrate a session from an external OIDC compliant endpoint.
|
507
|
+
# Stytch will call the external UserInfo endpoint defined in your Stytch Project settings in the [Dashboard](https://stytch.com/docs/dashboard), and then perform a lookup using the `session_token`. <!-- FIXME more specific dashboard link-->
|
508
|
+
# If the response contains a valid email address, Stytch will attempt to match that email address with an existing in your and create a Stytch Session.
|
509
|
+
# You will need to create the member before using this endpoint.
|
421
510
|
#
|
422
511
|
# == Parameters:
|
423
512
|
# session_token::
|
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/impersonation.rb
CHANGED
@@ -19,7 +19,7 @@ module Stytch
|
|
19
19
|
# Authenticate an impersonation token to impersonate a User. This endpoint requires an impersonation token that is not expired or previously used.
|
20
20
|
# A Stytch session will be created for the impersonated user with a 60 minute duration. Impersonated sessions cannot be extended.
|
21
21
|
#
|
22
|
-
# Prior to this step, you can generate an impersonation token by visiting the Stytch
|
22
|
+
# Prior to this step, you can generate an impersonation token by visiting the Stytch Dashboard, viewing a user, and clicking the `Impersonate User` button.
|
23
23
|
#
|
24
24
|
# == Parameters:
|
25
25
|
# impersonation_token::
|
data/lib/stytch/passwords.rb
CHANGED
@@ -201,7 +201,7 @@ module Stytch
|
|
201
201
|
|
202
202
|
# This API allows you to check whether or not the user’s provided password is valid, and to provide feedback to the user on how to increase the strength of their password.
|
203
203
|
#
|
204
|
-
# This endpoint adapts to your Project's password strength configuration. If you're using [zxcvbn](https://stytch.com/docs/guides/passwords/strength-policy), the default, your passwords are considered valid if the strength score is >= 3. If you're using [LUDS](https://stytch.com/docs/guides/passwords/strength-policy), your passwords are considered valid if they meet the requirements that you've set with Stytch. You may update your password strength configuration in the [
|
204
|
+
# This endpoint adapts to your Project's password strength configuration. If you're using [zxcvbn](https://stytch.com/docs/guides/passwords/strength-policy), the default, your passwords are considered valid if the strength score is >= 3. If you're using [LUDS](https://stytch.com/docs/guides/passwords/strength-policy), your passwords are considered valid if they meet the requirements that you've set with Stytch. You may update your password strength configuration in the [Stytch Dashboard](https://stytch.com/dashboard/password-strength-config).
|
205
205
|
#
|
206
206
|
#
|
207
207
|
# ### Password feedback
|
@@ -293,9 +293,9 @@ module Stytch
|
|
293
293
|
# The `untrusted_metadata` field contains an arbitrary JSON object of application-specific data. Untrusted metadata can be edited by end users directly via the SDK, and **cannot be used to store critical information.** See the [Metadata](https://stytch.com/docs/api/metadata) reference for complete field behavior details.
|
294
294
|
# The type of this field is nilable +object+.
|
295
295
|
# set_email_verified::
|
296
|
-
# Whether to set the user's email as verified. This is a dangerous field
|
297
|
-
# deduplicated into one
|
298
|
-
#
|
296
|
+
# Whether to set the user's email as verified. This is a dangerous field, incorrect use may lead to users getting erroneously
|
297
|
+
# deduplicated into one User object. This flag should only be set if you can attest that the user owns the email address in question.
|
298
|
+
#
|
299
299
|
# The type of this field is nilable +Boolean+.
|
300
300
|
# name::
|
301
301
|
# The name of the user. Each field in the name object is optional.
|
@@ -304,12 +304,15 @@ module Stytch
|
|
304
304
|
# The phone number of the user. The phone number should be in E.164 format (i.e. +1XXXXXXXXXX).
|
305
305
|
# The type of this field is nilable +String+.
|
306
306
|
# set_phone_number_verified::
|
307
|
-
# Whether to set the user's phone number as verified. This is a dangerous field
|
308
|
-
# the user owns the phone number in question.
|
307
|
+
# Whether to set the user's phone number as verified. This is a dangerous field, this flag should only be set if you can attest that
|
308
|
+
# the user owns the phone number in question.
|
309
309
|
# The type of this field is nilable +Boolean+.
|
310
310
|
# external_id::
|
311
311
|
# If a new user is created, this will set an identifier that can be used in API calls wherever a user_id is expected. This is a string consisting of alphanumeric, `.`, `_`, `-`, or `|` characters with a maximum length of 128 characters.
|
312
312
|
# The type of this field is nilable +String+.
|
313
|
+
# roles::
|
314
|
+
# (no documentation yet)
|
315
|
+
# The type of this field is nilable list of +String+.
|
313
316
|
#
|
314
317
|
# == Returns:
|
315
318
|
# An object with the following fields:
|
@@ -346,7 +349,8 @@ module Stytch
|
|
346
349
|
name: nil,
|
347
350
|
phone_number: nil,
|
348
351
|
set_phone_number_verified: nil,
|
349
|
-
external_id: nil
|
352
|
+
external_id: nil,
|
353
|
+
roles: nil
|
350
354
|
)
|
351
355
|
headers = {}
|
352
356
|
request = {
|
@@ -366,6 +370,7 @@ module Stytch
|
|
366
370
|
request[:phone_number] = phone_number unless phone_number.nil?
|
367
371
|
request[:set_phone_number_verified] = set_phone_number_verified unless set_phone_number_verified.nil?
|
368
372
|
request[:external_id] = external_id unless external_id.nil?
|
373
|
+
request[:roles] = roles unless roles.nil?
|
369
374
|
|
370
375
|
post_request('/v1/passwords/migrate', request, headers)
|
371
376
|
end
|
data/lib/stytch/sessions.rb
CHANGED
@@ -326,6 +326,85 @@ module Stytch
|
|
326
326
|
get_request(request, headers)
|
327
327
|
end
|
328
328
|
|
329
|
+
# Exchange an auth token issued by a trusted identity provider for a Stytch session. You must first register a Trusted Auth Token profile in the Stytch dashboard [here](https://stytch.com/docs/dashboard/trusted-auth-tokens). If a session token or session JWT is provided, it will add the trusted auth token as an authentication factor to the existing session.
|
330
|
+
#
|
331
|
+
# == Parameters:
|
332
|
+
# profile_id::
|
333
|
+
# The ID of the trusted auth token profile to use for attestation.
|
334
|
+
# The type of this field is +String+.
|
335
|
+
# token::
|
336
|
+
# The trusted auth token to authenticate.
|
337
|
+
# The type of this field is +String+.
|
338
|
+
# session_duration_minutes::
|
339
|
+
# Set the session lifetime to be this many minutes from now. This will start a new session if one doesn't already exist,
|
340
|
+
# returning both an opaque `session_token` and `session_jwt` for this session. Remember that the `session_jwt` will have a fixed lifetime of
|
341
|
+
# five minutes regardless of the underlying session duration, and will need to be refreshed over time.
|
342
|
+
#
|
343
|
+
# This value must be a minimum of 5 and a maximum of 527040 minutes (366 days).
|
344
|
+
#
|
345
|
+
# If a `session_token` or `session_jwt` is provided then a successful authentication will continue to extend the session this many minutes.
|
346
|
+
#
|
347
|
+
# If the `session_duration_minutes` parameter is not specified, a Stytch session will not be created.
|
348
|
+
# The type of this field is nilable +Integer+.
|
349
|
+
# session_custom_claims::
|
350
|
+
# Add a custom claims map to the Session being authenticated. Claims are only created if a Session is initialized by providing a value in `session_duration_minutes`. Claims will be included on the Session object and in the JWT. To update a key in an existing Session, supply a new value. To delete a key, supply a null value.
|
351
|
+
#
|
352
|
+
# Custom claims made with reserved claims ("iss", "sub", "aud", "exp", "nbf", "iat", "jti") will be ignored. Total custom claims size cannot exceed four kilobytes.
|
353
|
+
# The type of this field is nilable +object+.
|
354
|
+
# session_token::
|
355
|
+
# The `session_token` for the session that you wish to add the trusted auth token authentication factor to.
|
356
|
+
# The type of this field is nilable +String+.
|
357
|
+
# session_jwt::
|
358
|
+
# The `session_jwt` for the session that you wish to add the trusted auth token authentication factor to.
|
359
|
+
# The type of this field is nilable +String+.
|
360
|
+
#
|
361
|
+
# == Returns:
|
362
|
+
# An object with the following fields:
|
363
|
+
# request_id::
|
364
|
+
# 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.
|
365
|
+
# The type of this field is +String+.
|
366
|
+
# user_id::
|
367
|
+
# The unique ID of the affected User.
|
368
|
+
# The type of this field is +String+.
|
369
|
+
# session_token::
|
370
|
+
# A secret token for a given Stytch Session.
|
371
|
+
# The type of this field is +String+.
|
372
|
+
# session_jwt::
|
373
|
+
# The JSON Web Token (JWT) for a given Stytch Session.
|
374
|
+
# The type of this field is +String+.
|
375
|
+
# user::
|
376
|
+
# The `user` object affected by this API call. See the [Get user endpoint](https://stytch.com/docs/api/get-user) for complete response field details.
|
377
|
+
# The type of this field is +User+ (+object+).
|
378
|
+
# status_code::
|
379
|
+
# 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.
|
380
|
+
# The type of this field is +Integer+.
|
381
|
+
# session::
|
382
|
+
# If you initiate a Session, by including `session_duration_minutes` in your authenticate call, you'll receive a full Session object in the response.
|
383
|
+
#
|
384
|
+
# See [Session object](https://stytch.com/docs/api/session-object) for complete response fields.
|
385
|
+
#
|
386
|
+
# The type of this field is nilable +Session+ (+object+).
|
387
|
+
def attest(
|
388
|
+
profile_id:,
|
389
|
+
token:,
|
390
|
+
session_duration_minutes: nil,
|
391
|
+
session_custom_claims: nil,
|
392
|
+
session_token: nil,
|
393
|
+
session_jwt: nil
|
394
|
+
)
|
395
|
+
headers = {}
|
396
|
+
request = {
|
397
|
+
profile_id: profile_id,
|
398
|
+
token: token
|
399
|
+
}
|
400
|
+
request[:session_duration_minutes] = session_duration_minutes unless session_duration_minutes.nil?
|
401
|
+
request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?
|
402
|
+
request[:session_token] = session_token unless session_token.nil?
|
403
|
+
request[:session_jwt] = session_jwt unless session_jwt.nil?
|
404
|
+
|
405
|
+
post_request('/v1/sessions/attest', request, headers)
|
406
|
+
end
|
407
|
+
|
329
408
|
# MANUAL(Sessions::authenticate_jwt)(SERVICE_METHOD)
|
330
409
|
# ADDIMPORT: require 'jwt'
|
331
410
|
# ADDIMPORT: require 'json/jwt'
|
data/lib/stytch/version.rb
CHANGED
data/lib/stytch/webauthn.rb
CHANGED
@@ -50,6 +50,9 @@ module Stytch
|
|
50
50
|
# override_display_name::
|
51
51
|
# (no documentation yet)
|
52
52
|
# The type of this field is nilable +String+.
|
53
|
+
# use_base64_url_encoding::
|
54
|
+
# (no documentation yet)
|
55
|
+
# The type of this field is nilable +Boolean+.
|
53
56
|
#
|
54
57
|
# == Returns:
|
55
58
|
# An object with the following fields:
|
@@ -73,7 +76,8 @@ module Stytch
|
|
73
76
|
return_passkey_credential_options: nil,
|
74
77
|
override_id: nil,
|
75
78
|
override_name: nil,
|
76
|
-
override_display_name: nil
|
79
|
+
override_display_name: nil,
|
80
|
+
use_base64_url_encoding: nil
|
77
81
|
)
|
78
82
|
headers = {}
|
79
83
|
request = {
|
@@ -86,6 +90,7 @@ module Stytch
|
|
86
90
|
request[:override_id] = override_id unless override_id.nil?
|
87
91
|
request[:override_name] = override_name unless override_name.nil?
|
88
92
|
request[:override_display_name] = override_display_name unless override_display_name.nil?
|
93
|
+
request[:use_base64_url_encoding] = use_base64_url_encoding unless use_base64_url_encoding.nil?
|
89
94
|
|
90
95
|
post_request('/v1/webauthn/register/start', request, headers)
|
91
96
|
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: 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-
|
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
|