add create connection method#68
Open
dhaneshbs wants to merge 1 commit into
Open
Conversation
| * @param connection The data for the new connection | ||
| * @returns {Promise<CreateConnectionResponse>} The created connection | ||
| */ | ||
| async createConnection(organizationId: string, connection: CreateConnection): Promise<CreateConnectionResponse> { |
Contributor
There was a problem hiding this comment.
My current understanding
When developers try to create a connection using this method:
-
They pass
organizationId -
They pass an object
- enum:
OKTA,ENTRA - string:
OIDC,SAML
Problem
- enum:
Whether this creates SSO Connection or SCIM is not clear.
Proposal
While passing an option as part of a Object is a preferred, like { "feature": "sso" } , this exercise has to be consistent with other APIs. For example, List All Connections API response does not have an equivalent feature property, but provider and type attributes together confirm it's a SSO connection.
List Connections API response
{
"connections": [
{
"id": "conn_2123312131125533",
"organization_id": "org_1232434",
"provider": "OKTA",
"type": "SAML",
"status": "COMPLETED",
"enabled": true,
"debug_enabled": false,
"configuration_type": "MANUAL",
"saml_config": {
"sp_entity_id": "https://yourapp.com/service/saml",
"sp_assertion_url": "https://youridp.com/service/saml/assertion",
"sp_metadata_url": "https://youridp.com/service/saml/metadata",
"idp_metadata_url": "https://youridp.com/service/idp/metadata",
"idp_sso_url": "https://youridp.com/sso/saml"
},
"attribute_mapping": {
"email": "email",
"family_name": "lastName",
"given_name": "firstName",
"sub": "nameid"
},
"create_time": "2024-01-05T14:48:00.000Z"
}
]
}To stay consistent, we let users pass provider and type as two options together to determine what connection (SSO or SCIM) connection to create. Open for more options, yet to research my bit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added create connection method