Class: StytchB2B::SCIM::Connection
- Inherits:
-
Object
- Object
- StytchB2B::SCIM::Connection
- Includes:
- Stytch::RequestHelper
- Defined in:
- lib/stytch/b2b_scim.rb
Defined Under Namespace
Classes: CreateRequestOptions, DeleteRequestOptions, GetGroupsRequestOptions, GetRequestOptions, RotateCancelRequestOptions, RotateCompleteRequestOptions, RotateStartRequestOptions, UpdateRequestOptions
Instance Method Summary collapse
-
#create(organization_id:, display_name: nil, identity_provider: nil, method_options: nil) ⇒ Object
Create a new SCIM Connection.
-
#delete(organization_id:, connection_id:, method_options: nil) ⇒ Object
Deletes a SCIM Connection.
-
#get(organization_id:, method_options: nil) ⇒ Object
Get SCIM Connection.
-
#get_groups(organization_id:, connection_id:, cursor: nil, limit: nil, method_options: nil) ⇒ Object
Gets a paginated list of all SCIM Groups associated with a given Connection.
-
#initialize(connection) ⇒ Connection
constructor
A new instance of Connection.
-
#rotate_cancel(organization_id:, connection_id:, method_options: nil) ⇒ Object
Cancel a SCIM token rotation.
-
#rotate_complete(organization_id:, connection_id:, method_options: nil) ⇒ Object
Completes a SCIM token rotation.
-
#rotate_start(organization_id:, connection_id:, method_options: nil) ⇒ Object
Start a SCIM token rotation.
-
#update(organization_id:, connection_id:, display_name: nil, identity_provider: nil, scim_group_implicit_role_assignments: nil, method_options: nil) ⇒ Object
Update a SCIM Connection.
Methods included from Stytch::RequestHelper
#delete_request, #get_request, #post_request, #put_request, #request_with_query_params
Constructor Details
#initialize(connection) ⇒ Connection
Returns a new instance of Connection.
177 178 179 |
# File 'lib/stytch/b2b_scim.rb', line 177 def initialize(connection) @connection = connection end |
Instance Method Details
#create(organization_id:, display_name: nil, identity_provider: nil, method_options: nil) ⇒ Object
Create a new SCIM Connection.
Parameters:
- organization_id
Globally unique UUID that identifies a specific Organization. The
organization_idis critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. The type of this field isString.- display_name
A human-readable display name for the connection. The type of this field is nilable
String.- identity_provider
(no documentation yet) The type of this field is nilable
CreateRequestIdentityProvider(string enum).
Returns:
An object with the following fields:
- request_id
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. The type of this field is
String.- status_code
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. The type of this field is
Integer.- connection
The SCIM Connection Object. The type of this field is nilable
SCIMConnectionWithToken(+object+).
Method Options:
This method supports an optional StytchB2B::SCIM::Connection::CreateRequestOptions object which will modify the headers sent in the HTTP request.
448 449 450 451 452 453 454 455 456 457 458 459 460 461 |
# File 'lib/stytch/b2b_scim.rb', line 448 def create( organization_id:, display_name: nil, identity_provider: nil, method_options: nil ) headers = {} headers = headers.merge(.to_headers) unless .nil? request = {} request[:display_name] = display_name unless display_name.nil? request[:identity_provider] = identity_provider unless identity_provider.nil? post_request("/v1/b2b/scim/#{organization_id}/connection", request, headers) end |
#delete(organization_id:, connection_id:, method_options: nil) ⇒ Object
Deletes a SCIM Connection.
Parameters:
- organization_id
Globally unique UUID that identifies a specific Organization. The
organization_idis critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. The type of this field isString.- connection_id
The ID of the SCIM connection. The type of this field is
String.
Returns:
An object with the following fields:
- request_id
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. The type of this field is
String.- connection_id
The
connection_idthat was deleted as part of the delete request. The type of this field isString.- status_code
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. The type of this field is
Integer.
Method Options:
This method supports an optional StytchB2B::SCIM::Connection::DeleteRequestOptions object which will modify the headers sent in the HTTP request.
256 257 258 259 260 261 262 263 264 |
# File 'lib/stytch/b2b_scim.rb', line 256 def delete( organization_id:, connection_id:, method_options: nil ) headers = {} headers = headers.merge(.to_headers) unless .nil? delete_request("/v1/b2b/scim/#{organization_id}/connection/#{connection_id}", headers) end |
#get(organization_id:, method_options: nil) ⇒ Object
Get SCIM Connection.
Parameters:
- organization_id
Globally unique UUID that identifies a specific Organization. The
organization_idis critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. The type of this field isString.
Returns:
An object with the following fields:
- request_id
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. The type of this field is
String.- status_code
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. The type of this field is
Integer.- connection
The SCIM Connection Object. The type of this field is nilable
SCIMConnection(+object+).
Method Options:
This method supports an optional StytchB2B::SCIM::Connection::GetRequestOptions object which will modify the headers sent in the HTTP request.
484 485 486 487 488 489 490 491 492 493 |
# File 'lib/stytch/b2b_scim.rb', line 484 def get( organization_id:, method_options: nil ) headers = {} headers = headers.merge(.to_headers) unless .nil? query_params = {} request = request_with_query_params("/v1/b2b/scim/#{organization_id}/connection", query_params) get_request(request, headers) end |
#get_groups(organization_id:, connection_id:, cursor: nil, limit: nil, method_options: nil) ⇒ Object
Gets a paginated list of all SCIM Groups associated with a given Connection.
Parameters:
- organization_id
Globally unique UUID that identifies a specific Organization. The
organization_idis critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. The type of this field isString.- connection_id
The ID of the SCIM connection. The type of this field is
String.- cursor
The
cursorfield 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 thecursor. If you receive a response that includes a non-nullnext_cursorin theresults_metadataobject, repeat the search call with thenext_cursorvalue set to thecursorfield to retrieve the next page of results. Continue to make search calls until thenext_cursorin the response is null. The type of this field is nilableString.- limit
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
cursorfield. The type of this field is nilableInteger.
Returns:
An object with the following fields:
- scim_groups
A list of SCIM Connection Groups belonging to the connection. The type of this field is list of
SCIMGroup(+object+).- status_code
(no documentation yet) The type of this field is
Integer.- next_cursor
The
next_cursorstring is returned when your search result contains more than one page of results. This value is passed into your next search call in thecursorfield. The type of this field is nilableString.
Method Options:
This method supports an optional StytchB2B::SCIM::Connection::GetGroupsRequestOptions object which will modify the headers sent in the HTTP request.
404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 |
# File 'lib/stytch/b2b_scim.rb', line 404 def get_groups( organization_id:, connection_id:, cursor: nil, limit: nil, method_options: nil ) headers = {} headers = headers.merge(.to_headers) unless .nil? query_params = { cursor: cursor, limit: limit } request = request_with_query_params("/v1/b2b/scim/#{organization_id}/connection/#{connection_id}", query_params) get_request(request, headers) end |
#rotate_cancel(organization_id:, connection_id:, method_options: nil) ⇒ Object
Cancel a SCIM token rotation. This will cancel the current token rotation process, keeping the original token active.
Parameters:
- organization_id
Globally unique UUID that identifies a specific Organization. The
organization_idis critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. The type of this field isString.- connection_id
The ID of the SCIM connection. The type of this field is
String.
Returns:
An object with the following fields:
- request_id
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. The type of this field is
String.- status_code
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. The type of this field is
Integer.- connection
The SCIM Connection Object. The type of this field is nilable
SCIMConnection(+object+).
Method Options:
This method supports an optional StytchB2B::SCIM::Connection::RotateCancelRequestOptions object which will modify the headers sent in the HTTP request.
362 363 364 365 366 367 368 369 370 371 372 |
# File 'lib/stytch/b2b_scim.rb', line 362 def rotate_cancel( organization_id:, connection_id:, method_options: nil ) headers = {} headers = headers.merge(.to_headers) unless .nil? request = {} post_request("/v1/b2b/scim/#{organization_id}/connection/#{connection_id}/rotate/cancel", request, headers) end |
#rotate_complete(organization_id:, connection_id:, method_options: nil) ⇒ Object
Completes a SCIM token rotation. This will complete the current token rotation process and update the active token to be the new token supplied in the start SCIM token rotation response.
Parameters:
- organization_id
Globally unique UUID that identifies a specific Organization. The
organization_idis critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. The type of this field isString.- connection_id
The ID of the SCIM connection. The type of this field is
String.
Returns:
An object with the following fields:
- request_id
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. The type of this field is
String.- status_code
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. The type of this field is
Integer.- connection
The SCIM Connection Object. The type of this field is nilable
SCIMConnection(+object+).
Method Options:
This method supports an optional StytchB2B::SCIM::Connection::RotateCompleteRequestOptions object which will modify the headers sent in the HTTP request.
326 327 328 329 330 331 332 333 334 335 336 |
# File 'lib/stytch/b2b_scim.rb', line 326 def rotate_complete( organization_id:, connection_id:, method_options: nil ) headers = {} headers = headers.merge(.to_headers) unless .nil? request = {} post_request("/v1/b2b/scim/#{organization_id}/connection/#{connection_id}/rotate/complete", request, headers) end |
#rotate_start(organization_id:, connection_id:, method_options: nil) ⇒ Object
Start a SCIM token rotation.
Parameters:
- organization_id
Globally unique UUID that identifies a specific Organization. The
organization_idis critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. The type of this field isString.- connection_id
The ID of the SCIM connection. The type of this field is
String.
Returns:
An object with the following fields:
- request_id
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. The type of this field is
String.- status_code
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. The type of this field is
Integer.- connection
The SCIM Connection Object. The type of this field is nilable
SCIMConnectionWithNextToken(+object+).
Method Options:
This method supports an optional StytchB2B::SCIM::Connection::RotateStartRequestOptions object which will modify the headers sent in the HTTP request.
290 291 292 293 294 295 296 297 298 299 300 |
# File 'lib/stytch/b2b_scim.rb', line 290 def rotate_start( organization_id:, connection_id:, method_options: nil ) headers = {} headers = headers.merge(.to_headers) unless .nil? request = {} post_request("/v1/b2b/scim/#{organization_id}/connection/#{connection_id}/rotate/start", request, headers) end |
#update(organization_id:, connection_id:, display_name: nil, identity_provider: nil, scim_group_implicit_role_assignments: nil, method_options: nil) ⇒ Object
Update a SCIM Connection.
Parameters:
- organization_id
Globally unique UUID that identifies a specific Organization. The
organization_idis critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. The type of this field isString.- connection_id
The ID of the SCIM connection. The type of this field is
String.- display_name
A human-readable display name for the connection. The type of this field is nilable
String.- identity_provider
(no documentation yet) The type of this field is nilable
UpdateRequestIdentityProvider(string enum).- scim_group_implicit_role_assignments
An array of SCIM group implicit role assignments. Each object in the array must contain a
group_idand arole_id. The type of this field is nilable list ofSCIMGroupImplicitRoleAssignments.
Returns:
An object with the following fields:
- request_id
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. The type of this field is
String.- status_code
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. The type of this field is
Integer.- connection
The SCIM Connection Object. The type of this field is nilable
SCIMConnection(+object+).
Method Options:
This method supports an optional StytchB2B::SCIM::Connection::UpdateRequestOptions object which will modify the headers sent in the HTTP request.
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/stytch/b2b_scim.rb', line 214 def update( organization_id:, connection_id:, display_name: nil, identity_provider: nil, scim_group_implicit_role_assignments: nil, method_options: nil ) headers = {} headers = headers.merge(.to_headers) unless .nil? request = {} request[:display_name] = display_name unless display_name.nil? request[:identity_provider] = identity_provider unless identity_provider.nil? request[:scim_group_implicit_role_assignments] = scim_group_implicit_role_assignments unless scim_group_implicit_role_assignments.nil? put_request("/v1/b2b/scim/#{organization_id}/connection/#{connection_id}", request, headers) end |