stytch 9.7.0 → 9.8.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: 2234d80bb5d7d5fa35a2f270fb6edf74d42e8f23a75751f5eba3942cf6fa3b3a
4
- data.tar.gz: 90df59d4eac45d2ffa9b4156c040d30dc0ea4ba852db24be010a0247825ef772
3
+ metadata.gz: e075ae0bbd1a3f639927bcd53fc125ce81856a38ca08af4fda63a5a67c59a8d2
4
+ data.tar.gz: f820f820eff94a0d24e504bc1cb2a31d449124609b37edb60d1f6678acfe19e8
5
5
  SHA512:
6
- metadata.gz: 2cdcc7b6d7e4aacdf2f912f9fd253bb81be8f53e262a7d8ddd380f8c83610895c29c2ecbd87870b8edff04ca7d5f0d047c86215a74d78afec0d4372659f3c4e5
7
- data.tar.gz: 0b321be206d3cb41a31806b9893dfb67405a098f42b950fb456f55d16ae0a12d7c73455391cafb2f3177aef87f4142e9be3293c963b0f5660fd7cbab3c6f8a2c
6
+ metadata.gz: 392f3723a7fd0e3950a4179da49c49dc2c01d469b6b2c4107c6d6d20b9beabcee3b5741c16f260ad04dc440c42122bd3098e5eb91844133c9cf08a4e30f58443
7
+ data.tar.gz: bb1e40d2bbc571b03215aa94dc40164816fd5559f412c14cb4b9b6b73ef1046a3339005d456ccb294b712d353c17eb53cf08b0fb0bfa030dd061fd11afc92712
@@ -1104,6 +1104,9 @@ module StytchB2B
1104
1104
  # member_id::
1105
1105
  # Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value.
1106
1106
  # The type of this field is +String+.
1107
+ # include_deleted::
1108
+ # Whether to include deleted Members in the response. Defaults to false.
1109
+ # The type of this field is nilable +Boolean+.
1107
1110
  #
1108
1111
  # == Returns:
1109
1112
  # An object with the following fields:
@@ -1123,10 +1126,13 @@ module StytchB2B
1123
1126
  # 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.
1124
1127
  # The type of this field is +Integer+.
1125
1128
  def dangerously_get(
1126
- member_id:
1129
+ member_id:,
1130
+ include_deleted: nil
1127
1131
  )
1128
1132
  headers = {}
1129
- query_params = {}
1133
+ query_params = {
1134
+ include_deleted: include_deleted
1135
+ }
1130
1136
  request = request_with_query_params("/v1/b2b/organizations/members/dangerously_get/#{member_id}", query_params)
1131
1137
  get_request(request, headers)
1132
1138
  end
@@ -49,13 +49,14 @@ module StytchB2B
49
49
  end
50
50
 
51
51
  include Stytch::RequestHelper
52
- attr_reader :oidc, :saml
52
+ attr_reader :oidc, :saml, :external
53
53
 
54
54
  def initialize(connection)
55
55
  @connection = connection
56
56
 
57
57
  @oidc = StytchB2B::SSO::OIDC.new(@connection)
58
58
  @saml = StytchB2B::SSO::SAML.new(@connection)
59
+ @external = StytchB2B::SSO::External.new(@connection)
59
60
  end
60
61
 
61
62
  # Get all SSO Connections owned by the organization.
@@ -77,7 +78,7 @@ module StytchB2B
77
78
  # The list of [OIDC Connections](https://stytch.com/docs/b2b/api/oidc-connection-object) owned by this organization.
78
79
  # The type of this field is list of +OIDCConnection+ (+object+).
79
80
  # external_connections::
80
- # (no documentation yet)
81
+ # The list of [External Connections](https://stytch.com/docs/b2b/api/external-connection-object) owned by this organization.
81
82
  # The type of this field is list of +Connection+ (+object+).
82
83
  # status_code::
83
84
  # 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.
@@ -103,7 +104,7 @@ module StytchB2B
103
104
  # The organization ID that the SSO connection belongs to.
104
105
  # The type of this field is +String+.
105
106
  # connection_id::
106
- # The ID of the SSO connection. Both SAML and OIDC connection IDs can be provided.
107
+ # The ID of the SSO connection. SAML, OIDC, and External connection IDs can be provided.
107
108
  # The type of this field is +String+.
108
109
  #
109
110
  # == Returns:
@@ -759,5 +760,166 @@ module StytchB2B
759
760
  delete_request("/v1/b2b/sso/saml/#{organization_id}/connections/#{connection_id}/verification_certificates/#{certificate_id}", headers)
760
761
  end
761
762
  end
763
+
764
+ class External
765
+ class CreateConnectionRequestOptions
766
+ # Optional authorization object.
767
+ # Pass in an active Stytch Member session token or session JWT and the request
768
+ # will be run using that member's permissions.
769
+ attr_accessor :authorization
770
+
771
+ def initialize(
772
+ authorization: nil
773
+ )
774
+ @authorization = authorization
775
+ end
776
+
777
+ def to_headers
778
+ headers = {}
779
+ headers.merge!(@authorization.to_headers) if authorization
780
+ headers
781
+ end
782
+ end
783
+
784
+ class UpdateConnectionRequestOptions
785
+ # Optional authorization object.
786
+ # Pass in an active Stytch Member session token or session JWT and the request
787
+ # will be run using that member's permissions.
788
+ attr_accessor :authorization
789
+
790
+ def initialize(
791
+ authorization: nil
792
+ )
793
+ @authorization = authorization
794
+ end
795
+
796
+ def to_headers
797
+ headers = {}
798
+ headers.merge!(@authorization.to_headers) if authorization
799
+ headers
800
+ end
801
+ end
802
+
803
+ include Stytch::RequestHelper
804
+
805
+ def initialize(connection)
806
+ @connection = connection
807
+ end
808
+
809
+ # Create a new External SSO Connection.
810
+ #
811
+ # == Parameters:
812
+ # organization_id::
813
+ # Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
814
+ # The type of this field is +String+.
815
+ # external_organization_id::
816
+ # Globally unique UUID that identifies a different Organization within your Project.
817
+ # The type of this field is +String+.
818
+ # external_connection_id::
819
+ # Globally unique UUID that identifies a specific SSO connection configured for a different Organization in your Project.
820
+ # The type of this field is +String+.
821
+ # display_name::
822
+ # A human-readable display name for the connection.
823
+ # The type of this field is nilable +String+.
824
+ # connection_implicit_role_assignments::
825
+ # (no documentation yet)
826
+ # The type of this field is nilable list of +SAMLConnectionImplicitRoleAssignment+.
827
+ # group_implicit_role_assignments::
828
+ # (no documentation yet)
829
+ # The type of this field is nilable list of +SAMLGroupImplicitRoleAssignment+.
830
+ #
831
+ # == Returns:
832
+ # An object with the following fields:
833
+ # request_id::
834
+ # 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.
835
+ # The type of this field is +String+.
836
+ # status_code::
837
+ # 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.
838
+ # The type of this field is +Integer+.
839
+ # connection::
840
+ # The `External Connection` object affected by this API call. See the [External Connection Object](https://stytch.com/docs/b2b/api/external-connection-object) for complete response field details.
841
+ # The type of this field is nilable +Connection+ (+object+).
842
+ #
843
+ # == Method Options:
844
+ # This method supports an optional +StytchB2B::SSO::External::CreateConnectionRequestOptions+ object which will modify the headers sent in the HTTP request.
845
+ def create_connection(
846
+ organization_id:,
847
+ external_organization_id:,
848
+ external_connection_id:,
849
+ display_name: nil,
850
+ connection_implicit_role_assignments: nil,
851
+ group_implicit_role_assignments: nil,
852
+ method_options: nil
853
+ )
854
+ headers = {}
855
+ headers = headers.merge(method_options.to_headers) unless method_options.nil?
856
+ request = {
857
+ external_organization_id: external_organization_id,
858
+ external_connection_id: external_connection_id
859
+ }
860
+ request[:display_name] = display_name unless display_name.nil?
861
+ request[:connection_implicit_role_assignments] = connection_implicit_role_assignments unless connection_implicit_role_assignments.nil?
862
+ request[:group_implicit_role_assignments] = group_implicit_role_assignments unless group_implicit_role_assignments.nil?
863
+
864
+ post_request("/v1/b2b/sso/external/#{organization_id}", request, headers)
865
+ end
866
+
867
+ # Updates an existing External SSO connection.
868
+ #
869
+ # == Parameters:
870
+ # organization_id::
871
+ # Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
872
+ # The type of this field is +String+.
873
+ # connection_id::
874
+ # Globally unique UUID that identifies a specific External SSO Connection.
875
+ # The type of this field is +String+.
876
+ # display_name::
877
+ # A human-readable display name for the connection.
878
+ # The type of this field is nilable +String+.
879
+ # external_connection_implicit_role_assignments::
880
+ # All Members who log in with this External connection will implicitly receive the specified Roles. See the [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/role-assignment) for more information about role assignment.Implicit role assignments are not supported for External connections if the underlying SSO connection is an OIDC connection.
881
+ # The type of this field is nilable list of +ConnectionImplicitRoleAssignment+.
882
+ # external_group_implicit_role_assignments::
883
+ # Defines the names of the groups
884
+ # that grant specific role assignments. For each group-Role pair, if a Member logs in with this external connection and
885
+ # belongs to the specified group, they will be granted the associated Role. See the
886
+ # [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/role-assignment) for more information about role assignment.
887
+ # Before adding any group implicit role assignments to an external connection, you must add a "groups" key to the underlying SAML connection's
888
+ # `attribute_mapping`. Make sure that the SAML connection IdP is configured to correctly send the group information. Implicit role assignments are not supported
889
+ # for External connections if the underlying SSO connection is an OIDC connection.
890
+ # The type of this field is nilable list of +GroupImplicitRoleAssignment+.
891
+ #
892
+ # == Returns:
893
+ # An object with the following fields:
894
+ # request_id::
895
+ # 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.
896
+ # The type of this field is +String+.
897
+ # status_code::
898
+ # 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.
899
+ # The type of this field is +Integer+.
900
+ # connection::
901
+ # The `External Connection` object affected by this API call. See the [External Connection Object](https://stytch.com/docs/b2b/api/external-connection-object) for complete response field details.
902
+ # The type of this field is nilable +Connection+ (+object+).
903
+ #
904
+ # == Method Options:
905
+ # This method supports an optional +StytchB2B::SSO::External::UpdateConnectionRequestOptions+ object which will modify the headers sent in the HTTP request.
906
+ def update_connection(
907
+ organization_id:,
908
+ connection_id:,
909
+ display_name: nil,
910
+ external_connection_implicit_role_assignments: nil,
911
+ external_group_implicit_role_assignments: nil,
912
+ method_options: nil
913
+ )
914
+ headers = {}
915
+ headers = headers.merge(method_options.to_headers) unless method_options.nil?
916
+ request = {}
917
+ request[:display_name] = display_name unless display_name.nil?
918
+ request[:external_connection_implicit_role_assignments] = external_connection_implicit_role_assignments unless external_connection_implicit_role_assignments.nil?
919
+ request[:external_group_implicit_role_assignments] = external_group_implicit_role_assignments unless external_group_implicit_role_assignments.nil?
920
+
921
+ put_request("/v1/b2b/sso/external/#{organization_id}/connections/#{connection_id}", request, headers)
922
+ end
923
+ end
762
924
  end
763
925
  end
@@ -160,7 +160,7 @@ module Stytch
160
160
  #
161
161
  # == Parameters:
162
162
  # session_token::
163
- # The `session_token` associated with a User's existing Session.
163
+ # The authorization token Stytch will pass in to the external userinfo endpoint.
164
164
  # The type of this field is +String+.
165
165
  # session_duration_minutes::
166
166
  # Set the session lifetime to be this many minutes from now. This will start a new session if one doesn't already exist,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stytch
4
- VERSION = '9.7.0'
4
+ VERSION = '9.8.0'
5
5
  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: 9.7.0
4
+ version: 9.8.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: 2024-10-09 00:00:00.000000000 Z
11
+ date: 2024-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -100,7 +100,7 @@ dependencies:
100
100
  - - '='
101
101
  - !ruby/object:Gem::Version
102
102
  version: 2.24.0
103
- description:
103
+ description:
104
104
  email:
105
105
  - support@stytch.com
106
106
  executables: []
@@ -162,7 +162,7 @@ licenses:
162
162
  metadata:
163
163
  homepage_uri: https://stytch.com
164
164
  source_code_uri: https://github.com/stytchauth/stytch-ruby
165
- post_install_message:
165
+ post_install_message:
166
166
  rdoc_options: []
167
167
  require_paths:
168
168
  - lib
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
178
  version: '0'
179
179
  requirements: []
180
180
  rubygems_version: 3.2.3
181
- signing_key:
181
+ signing_key:
182
182
  specification_version: 4
183
183
  summary: Stytch Ruby Gem
184
184
  test_files: []