Module identity_api

Module identity_api 

Source

Enums§

BatchPatchIdentitiesError
struct for typed errors of method batch_patch_identities
CreateIdentityError
struct for typed errors of method create_identity
CreateRecoveryCodeForIdentityError
struct for typed errors of method create_recovery_code_for_identity
CreateRecoveryLinkForIdentityError
struct for typed errors of method create_recovery_link_for_identity
DeleteIdentityCredentialsError
struct for typed errors of method delete_identity_credentials
DeleteIdentityError
struct for typed errors of method delete_identity
DeleteIdentitySessionsError
struct for typed errors of method delete_identity_sessions
DisableSessionError
struct for typed errors of method disable_session
ExtendSessionError
struct for typed errors of method extend_session
GetIdentityByExternalIdError
struct for typed errors of method get_identity_by_external_id
GetIdentityError
struct for typed errors of method get_identity
GetIdentitySchemaError
struct for typed errors of method get_identity_schema
GetSessionError
struct for typed errors of method get_session
ListIdentitiesError
struct for typed errors of method list_identities
ListIdentitySchemasError
struct for typed errors of method list_identity_schemas
ListIdentitySessionsError
struct for typed errors of method list_identity_sessions
ListSessionsError
struct for typed errors of method list_sessions
PatchIdentityError
struct for typed errors of method patch_identity
UpdateIdentityError
struct for typed errors of method update_identity

Functions§

batch_patch_identities
Creates multiple identities. You can also use this endpoint to import credentials, including passwords, social sign-in settings, and multi-factor authentication methods. You can import: Up to 1,000 identities per request Up to 200 identities per request if including plaintext passwords Avoid importing large batches with plaintext passwords. They can cause timeouts as the passwords need to be hashed before they are stored. If at least one identity is imported successfully, the response status is 200 OK. If all imports fail, the response is one of the following 4xx errors: 400 Bad Request: The request payload is invalid or improperly formatted. 409 Conflict: Duplicate identities or conflicting data were detected. If you get a 504 Gateway Timeout: Reduce the batch size Avoid duplicate identities Pre-hash passwords with BCrypt If the issue persists, contact support.
create_identity
Create an identity. This endpoint can also be used to import credentials for instance passwords, social sign in configurations or multifactor methods.
create_recovery_code_for_identity
This endpoint creates a recovery code which should be given to the user in order for them to recover (or activate) their account.
create_recovery_link_for_identity
This endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account.
delete_identity
Calling this endpoint irrecoverably and permanently deletes the identity given its ID. This action can not be undone. This endpoint returns 204 when the identity was deleted or 404 if the identity was not found.
delete_identity_credentials
Delete an identity credential by its type. You cannot delete passkeys or code auth credentials through this API.
delete_identity_sessions
Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity.
disable_session
Calling this endpoint deactivates the specified session. Session data is not deleted.
extend_session
Calling this endpoint extends the given session ID. If session.earliest_possible_extend is set it will only extend the session after the specified time has passed. This endpoint returns per default a 204 No Content response on success. Older Ory Network projects may return a 200 OK response with the session in the body. Returning the session as part of the response will be deprecated in the future and should not be relied upon. This endpoint ignores consecutive requests to extend the same session and returns a 404 error in those scenarios. This endpoint also returns 404 errors if the session does not exist. Retrieve the session ID from the /sessions/whoami endpoint / toSession SDK method.
get_identity
Return an identity by its ID. You can optionally include credentials (e.g. social sign in connections) in the response by using the include_credential query parameter.
get_identity_by_external_id
Return an identity by its external ID. You can optionally include credentials (e.g. social sign in connections) in the response by using the include_credential query parameter.
get_identity_schema
Return a specific identity schema.
get_session
This endpoint is useful for: Getting a session object with all specified expandables that exist in an administrative context.
list_identities
Lists all identities in the system. Note: filters cannot be combined.
list_identity_schemas
Returns a list of all identity schemas currently in use.
list_identity_sessions
This endpoint returns all sessions that belong to the given Identity.
list_sessions
Listing all sessions that exist.
patch_identity
Partially updates an identity’s field using JSON Patch. The fields id, stateChangedAt and credentials can not be updated using this method.
update_identity
This endpoint updates an identity. The full identity payload, except credentials, is expected. For partial updates, use the patchIdentity operation. A credential can be provided via the credentials field in the request body. If provided, the credentials will be imported and added to the existing credentials of the identity.