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.

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

Link to this type

array_result()

View Source
array_result() ::
  {:ok, [Okta.IdPs.IdentityProvider.t()], Tesla.Env.t()}
  | {:error, map(), any()}
Link to this type

single_result()

View Source
single_result() ::
  {:ok, Okta.IdPs.IdentityProvider.t(), Tesla.Env.t()} | {:error, map(), any()}

Link to this section Functions

Link to this function

activate_idp(client, idp_id)

View Source
activate_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

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

Link to this function

add_oidc_idp(client, name, protocol, policy)

View Source

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

Link to this function

deactivate_idp(client, idp_id)

View Source
deactivate_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

Link to this function

delete_idp(client, idp_id)

View Source
delete_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

Link to this function

find_idps(client, query, opts \\ [])

View Source
find_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

Link to this function

find_idps_by_type(client, type, opts \\ [])

View Source
find_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

Link to this function

find_users(client, idp_id)

View Source
find_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 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

Link to this function

get_linked_user(client, idp_id, user_id)

View Source
get_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 to this function

list_idps(client, opts \\ [])

View Source
list_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

Link to this function

partial_update_idp(client, idp_id, idp)

View Source

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

Link to this function

social_tokens(client, idp_id, user_id)

View Source
social_tokens(Okta.client(), String.t(), String.t()) :: Okta.result()

Social 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

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