okta_api v0.1.14 Okta.IdPs View Source
The Okta.IdPs
module provides access methods to the Okta Identity Providers API.
All methods require a Tesla Client struct created with Okta.client(base_url, api_key)
.
Examples
client = Okta.Client("https://dev-000000.okta.com", "thisismykeycreatedinokta")
{:ok, result, _env} = Okta.Users.list_idps(client)
Link to this section Summary
Functions
Activate Identity Provider. Activates an inactive IdP.
Adds a new IdP to your organization
Add Generic OpenID Connect Identity Provider
Deactivate Identity Provider. Deactivates an active IdP
Delete Identity Provider. Removes an IdP from your organization.
Find Identity Providers by Name. Searches for IdPs by name in your organization
Find Identity Providers by Type. Finds all IdPs with a specific type
Find Users. Find all the users linked to an identity provider.
Get Identity Provider. Fetches an IdP by id
Get a Linked Identity Provider User. Fetches a linked IdP user by ID.
Link a User to a Social Provider without a Transaction.
List Identity Providers. Enumerates IdPs in your organization with pagination. A subset of IdPs can be returned that match a supported filter expression or query.
Will perform a partial update of an IdP with any supplied attributes and with partial protocol and policy.
Social Authentication Token Operation.
Unlink User from IdP
Updates the configuration for an IdP. All properties must be specified when updating IdP configuration. Partial updates are not supported by the Okta API
Link to this section Types
array_result()
View Sourcearray_result() :: {:ok, [Okta.IdPs.IdentityProvider.t()], Tesla.Env.t()} | {:error, map(), any()}
single_result()
View Sourcesingle_result() :: {:ok, Okta.IdPs.IdentityProvider.t(), Tesla.Env.t()} | {:error, map(), any()}
Link to this section Functions
activate_idp(client, idp_id)
View Sourceactivate_idp(Okta.client(), String.t()) :: single_result()
Activate Identity Provider. Activates an inactive IdP.
This function returns a Okta.Idps.IdentityProvider
in the second tuple position.
https://developer.okta.com/docs/reference/api/idps/#activate-identity-provider
add_idp(client, idp)
View Sourceadd_idp(Okta.client(), Okta.IdPs.IdentityProvider.t()) :: single_result()
Adds a new IdP to your organization
The function requires an Okta.Idps.IdentityProvider
with type
, name
, protocol
and policy
and returns a Okta.Idps.IdentityProvider
in the second tuple position.
https://developer.okta.com/docs/reference/api/idps/#add-identity-provider
add_oidc_idp(client, name, protocol, policy)
View Sourceadd_oidc_idp( Okta.client(), String.t(), Okta.IdPs.Protocol.t(), Okta.IdPs.Policy.t() ) :: single_result()
Add Generic OpenID Connect Identity Provider
The function requires a name
and a Okta.IdPs.Protocol
and Okta.IdPs.Policy
and returns a Okta.Idps.IdentityProvider
in the second tuple position.
https://developer.okta.com/docs/reference/api/idps/#add-generic-openid-connect-identity-provider
deactivate_idp(client, idp_id)
View Sourcedeactivate_idp(Okta.client(), String.t()) :: single_result()
Deactivate Identity Provider. Deactivates an active IdP
This function returns a Okta.Idps.IdentityProvider
in the second tuple position.
https://developer.okta.com/docs/reference/api/idps/#deactivate-identity-provider
delete_idp(client, idp_id)
View Sourcedelete_idp(Okta.client(), String.t()) :: Okta.result()
Delete Identity Provider. Removes an IdP from your organization.
https://developer.okta.com/docs/reference/api/idps/#delete-identity-provider
find_idps(client, query, opts \\ [])
View Sourcefind_idps(Okta.client(), String.t(), keyword()) :: array_result()
Find Identity Providers by Name. Searches for IdPs by name in your organization
This function returns an array of Okta.Idps.IdentityProvider
in the second tuple position.
https://developer.okta.com/docs/reference/api/idps/#find-identity-providers-by-name
find_idps_by_type(client, type, opts \\ [])
View Sourcefind_idps_by_type(Okta.client(), String.t(), keyword()) :: array_result()
Find Identity Providers by Type. Finds all IdPs with a specific type
This function returns an array of Okta.Idps.IdentityProvider
in the second tuple position.
https://developer.okta.com/docs/reference/api/idps/#find-identity-providers-by-type
find_users(client, idp_id)
View Sourcefind_users(Okta.client(), String.t()) :: Okta.result()
Find Users. Find all the users linked to an identity provider.
https://developer.okta.com/docs/reference/api/idps/#find-users
get_idp(client, idp_id)
View Sourceget_idp(Okta.client(), String.t()) :: single_result()
Get Identity Provider. Fetches an IdP by id
This function returns a Okta.Idps.IdentityProvider
in the second tuple position.
https://developer.okta.com/docs/reference/api/idps/#get-identity-provider
get_linked_user(client, idp_id, user_id)
View Sourceget_linked_user(Okta.client(), String.t(), String.t()) :: Okta.result()
Get a Linked Identity Provider User. Fetches a linked IdP user by ID.
https://developer.okta.com/docs/reference/api/idps/#get-a-linked-identity-provider-user
link_user(client, idp_id, user_id, external_id)
View Sourcelink_user(Okta.client(), String.t(), String.t(), String.t()) :: Okta.result()
Link a User to a Social Provider without a Transaction.
Links an Okta user to an existing social provider. This endpoint doesn't support the SAML2 Identity Provider Type.
list_idps(client, opts \\ [])
View Sourcelist_idps(Okta.client(), keyword()) :: array_result()
List Identity Providers. Enumerates IdPs in your organization with pagination. A subset of IdPs can be returned that match a supported filter expression or query.
This function returns an array of Okta.Idps.IdentityProvider
in the second tuple position.
https://developer.okta.com/docs/reference/api/idps/#list-identity-providers
partial_update_idp(client, idp_id, idp)
View Sourcepartial_update_idp(Okta.client(), String.t(), Okta.IdPs.IdentityProvider.t()) :: single_result()
Will perform a partial update of an IdP with any supplied attributes and with partial protocol and policy.
It works by first fetching the IdP data from the API and merging the supplied data with Okta.Utils.merge_struct(struct1, struct2)
.
This means concurrent updates could fail as this is not an atomic transaction.
The function requires an Okta.Idps.IdentityProvider
and returns a Okta.Idps.IdentityProvider
in the second tuple position.
https://developer.okta.com/docs/reference/api/idps/#update-identity-provider
unlink_user(client, idp_id, user_id)
View Sourceunlink_user(Okta.client(), String.t(), String.t()) :: Okta.result()
Unlink User from IdP
Removes the link between the Okta user and the IdP user. The next time the user federates into Okta via this IdP, they have to re-link their account according to the account link policy configured in Okta for this IdP.
https://developer.okta.com/docs/reference/api/idps/#unlink-user-from-idp
update_idp(client, idp_id, idp)
View Sourceupdate_idp(Okta.client(), String.t(), Okta.IdPs.IdentityProvider.t()) :: single_result()
Updates the configuration for an IdP. All properties must be specified when updating IdP configuration. Partial updates are not supported by the Okta API
The function requires an Okta.Idps.IdentityProvider
with type
, name
, issuerMode
, status
, protocol
and policy
and returns a Okta.Idps.IdentityProvider
in the second tuple position.
https://developer.okta.com/docs/reference/api/idps/#update-identity-provider
social_tokens(client, idp_id, user_id)
View SourceSocial Authentication Token Operation.
Okta doesn't import all the user information from a social provider. If the app needs information which isn't imported, it can get the user token from this endpoint, then make an API call to the social provider with the token to request the additional information.
https://developer.okta.com/docs/reference/api/idps/#social-authentication-token-operation