View Source WorkOS.SSO (WorkOS SDK for Elixir v1.1.0)
Manage Single Sign-On (SSO) in WorkOS.
Summary
Functions
Deletes a connection.
Generates an OAuth 2.0 authorization URL.
Gets a connection given an ID.
Gets a profile given an access token.
Gets an access token along with the user Profile
.
Lists all connections.
Functions
@spec delete_connection(WorkOS.Client.t(), String.t()) :: WorkOS.Client.response(nil)
Deletes a connection.
Generates an OAuth 2.0 authorization URL.
Parameter options:
:organization
- The organization connection selector is used to initiate SSO for an Organization.:connection
- The connection connection selector is used to initiate SSO for a Connection.:redirect_uri
- A Redirect URI to return an authorized user to. (required):client_id
- This value can be obtained from the SSO Configuration page in the WorkOS dashboard.:provider
- The provider connection selector is used to initiate SSO using an OAuth provider.:state
- An optional parameter that can be used to encode arbitrary information to help restore application state between redirects.:login_hint
- Can be used to pre-fill the username/email address field of the IdP sign-in page for the user, if you know their username ahead of time.:domain_hint
- Can be used to pre-fill the domain field when initiating authentication with Microsoft OAuth, or with a GoogleSAML connection type.
@spec get_connection(WorkOS.Client.t(), String.t()) :: WorkOS.Client.response(WorkOS.SSO.Connection.t())
Gets a connection given an ID.
@spec get_profile(WorkOS.Client.t(), String.t()) :: WorkOS.Client.response(WorkOS.SSO.Profile.t())
Gets a profile given an access token.
@spec get_profile_and_token(WorkOS.Client.t(), String.t()) :: WorkOS.Client.response(WorkOS.SSO.ProfileAndToken.t())
Gets an access token along with the user Profile
.
Parameter options:
:code
- The authorization value which was passed back as a query parameter in the callback to the Redirect URI. (required)
@spec list_connections(map()) :: WorkOS.Client.response(WorkOS.List.t(WorkOS.SSO.Connection.t()))
@spec list_connections(WorkOS.Client.t(), map()) :: WorkOS.Client.response(WorkOS.List.t(WorkOS.SSO.Connection.t()))
Lists all connections.
Parameter options:
:connection_type
- Filter Connections by their type.:organization_id
- Filter Connections by their associated organization.:domain
- Filter Connections by their associated domain.:limit
- Maximum number of records to return. Accepts values between 1 and 100. Default is 10.:after
- Pagination cursor to receive records after a provided event ID.:before
- An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.:order
- Order the results by the creation time. Supported values are "asc" and "desc" for showing older and newer records first respectively.