Class: FusionAuth::FusionAuthClient
- Inherits:
-
Object
- Object
- FusionAuth::FusionAuthClient
- Defined in:
- lib/fusionauth/fusionauth_client.rb
Overview
This class is the the Ruby client library for the FusionAuth CIAM Platform https://fusionauth.io
Each method on this class calls one of the APIs for FusionAuth. In most cases, the methods will take either a Hash, an OpenStruct or any object that can be safely converted to JSON that conforms to the FusionAuth API interface. Likewise, most methods will return an OpenStruct that contains the response JSON from FusionAuth.
noinspection RubyInstanceMethodNamingConvention,RubyTooManyMethodsInspection,RubyParameterNamingConvention
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#connect_timeout ⇒ Object
Returns the value of attribute connect_timeout.
-
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
-
#tenant_id ⇒ Object
Returns the value of attribute tenant_id.
Instance Method Summary collapse
-
#action_user(request) ⇒ FusionAuth::ClientResponse
Takes an action on a user.
-
#add_user_to_family(family_id, request) ⇒ FusionAuth::ClientResponse
Adds a user to an existing family.
-
#cancel_action(action_id, request) ⇒ FusionAuth::ClientResponse
Cancels the user action.
-
#change_password(change_password_id, request) ⇒ FusionAuth::ClientResponse
Changes a user’s password using the change password Id.
-
#change_password_by_identity(request) ⇒ FusionAuth::ClientResponse
Changes a user’s password using their identity (login id and password).
-
#comment_on_user(request) ⇒ FusionAuth::ClientResponse
Adds a comment to the user’s account.
-
#create_application(application_id, request) ⇒ FusionAuth::ClientResponse
Creates an application.
-
#create_application_role(application_id, role_id, request) ⇒ FusionAuth::ClientResponse
Creates a new role for an application.
-
#create_audit_log(request) ⇒ FusionAuth::ClientResponse
Creates an audit log with the message and user name (usually an email).
-
#create_connector(connector_id, request) ⇒ FusionAuth::ClientResponse
Creates a connector.
-
#create_consent(consent_id, request) ⇒ FusionAuth::ClientResponse
Creates a user consent type.
-
#create_email_template(email_template_id, request) ⇒ FusionAuth::ClientResponse
Creates an email template.
-
#create_family(family_id, request) ⇒ FusionAuth::ClientResponse
Creates a family with the user id in the request as the owner and sole member of the family.
-
#create_form(form_id, request) ⇒ FusionAuth::ClientResponse
Creates a form.
-
#create_form_field(field_id, request) ⇒ FusionAuth::ClientResponse
Creates a form field.
-
#create_group(group_id, request) ⇒ FusionAuth::ClientResponse
Creates a group.
-
#create_group_members(request) ⇒ FusionAuth::ClientResponse
Creates a member in a group.
-
#create_identity_provider(identity_provider_id, request) ⇒ FusionAuth::ClientResponse
Creates an identity provider.
-
#create_lambda(lambda_id, request) ⇒ FusionAuth::ClientResponse
Creates a Lambda.
-
#create_tenant(tenant_id, request) ⇒ FusionAuth::ClientResponse
Creates a tenant.
-
#create_theme(theme_id, request) ⇒ FusionAuth::ClientResponse
Creates a Theme.
-
#create_user(user_id, request) ⇒ FusionAuth::ClientResponse
Creates a user.
-
#create_user_action(user_action_id, request) ⇒ FusionAuth::ClientResponse
Creates a user action.
-
#create_user_action_reason(user_action_reason_id, request) ⇒ FusionAuth::ClientResponse
Creates a user reason.
-
#create_user_consent(user_consent_id, request) ⇒ FusionAuth::ClientResponse
Creates a single User consent.
-
#create_webhook(webhook_id, request) ⇒ FusionAuth::ClientResponse
Creates a webhook.
-
#deactivate_application(application_id) ⇒ FusionAuth::ClientResponse
Deactivates the application with the given Id.
-
#deactivate_user(user_id) ⇒ FusionAuth::ClientResponse
Deactivates the user with the given Id.
-
#deactivate_user_action(user_action_id) ⇒ FusionAuth::ClientResponse
Deactivates the user action with the given Id.
-
#deactivate_users(user_ids) ⇒ FusionAuth::ClientResponse
deprecated
Deprecated.
This method has been renamed to deactivate_users_by_ids, use that method instead.
-
#deactivate_users_by_ids(user_ids) ⇒ FusionAuth::ClientResponse
Deactivates the users with the given ids.
-
#delete_application(application_id) ⇒ FusionAuth::ClientResponse
Hard deletes an application.
-
#delete_application_role(application_id, role_id) ⇒ FusionAuth::ClientResponse
Hard deletes an application role.
-
#delete_connector(connector_id) ⇒ FusionAuth::ClientResponse
Deletes the connector for the given Id.
-
#delete_consent(consent_id) ⇒ FusionAuth::ClientResponse
Deletes the consent for the given Id.
-
#delete_email_template(email_template_id) ⇒ FusionAuth::ClientResponse
Deletes the email template for the given Id.
-
#delete_form(form_id) ⇒ FusionAuth::ClientResponse
Deletes the form for the given Id.
-
#delete_form_field(field_id) ⇒ FusionAuth::ClientResponse
Deletes the form field for the given Id.
-
#delete_group(group_id) ⇒ FusionAuth::ClientResponse
Deletes the group for the given Id.
-
#delete_group_members(request) ⇒ FusionAuth::ClientResponse
Removes users as members of a group.
-
#delete_identity_provider(identity_provider_id) ⇒ FusionAuth::ClientResponse
Deletes the identity provider for the given Id.
-
#delete_key(key_id) ⇒ FusionAuth::ClientResponse
Deletes the key for the given Id.
-
#delete_lambda(lambda_id) ⇒ FusionAuth::ClientResponse
Deletes the lambda for the given Id.
-
#delete_registration(user_id, application_id) ⇒ FusionAuth::ClientResponse
Deletes the user registration for the given user and application.
-
#delete_tenant(tenant_id) ⇒ FusionAuth::ClientResponse
Deletes the tenant for the given Id.
-
#delete_tenant_async(tenant_id) ⇒ FusionAuth::ClientResponse
Deletes the tenant for the given Id asynchronously.
-
#delete_theme(theme_id) ⇒ FusionAuth::ClientResponse
Deletes the theme for the given Id.
-
#delete_user(user_id) ⇒ FusionAuth::ClientResponse
Deletes the user for the given Id.
-
#delete_user_action(user_action_id) ⇒ FusionAuth::ClientResponse
Deletes the user action for the given Id.
-
#delete_user_action_reason(user_action_reason_id) ⇒ FusionAuth::ClientResponse
Deletes the user action reason for the given Id.
-
#delete_users(request) ⇒ FusionAuth::ClientResponse
deprecated
Deprecated.
This method has been renamed to delete_users_by_query, use that method instead.
-
#delete_users_by_query(request) ⇒ FusionAuth::ClientResponse
Deletes the users with the given ids, or users matching the provided JSON query or queryString.
-
#delete_webhook(webhook_id) ⇒ FusionAuth::ClientResponse
Deletes the webhook for the given Id.
-
#disable_two_factor(user_id, code) ⇒ FusionAuth::ClientResponse
Disable Two Factor authentication for a user.
-
#enable_two_factor(user_id, request) ⇒ FusionAuth::ClientResponse
Enable Two Factor authentication for a user.
-
#exchange_o_auth_code_for_access_token(code, client_id, client_secret, redirect_uri) ⇒ FusionAuth::ClientResponse
Exchanges an OAuth authorization code for an access token.
-
#exchange_o_auth_code_for_access_token_using_pkce(code, client_id, client_secret, redirect_uri, code_verifier) ⇒ FusionAuth::ClientResponse
Exchanges an OAuth authorization code and code_verifier for an access token.
-
#exchange_refresh_token_for_access_token(refresh_token, client_id, client_secret, scope, user_code) ⇒ FusionAuth::ClientResponse
Exchange a Refresh Token for an Access Token.
-
#exchange_refresh_token_for_jwt(request) ⇒ FusionAuth::ClientResponse
Exchange a refresh token for a new JWT.
-
#exchange_user_credentials_for_access_token(username, password, client_id, client_secret, scope, user_code) ⇒ FusionAuth::ClientResponse
Exchange User Credentials for a Token.
-
#forgot_password(request) ⇒ FusionAuth::ClientResponse
Begins the forgot password sequence, which kicks off an email to the user so that they can reset their password.
-
#generate_email_verification_id(email) ⇒ FusionAuth::ClientResponse
Generate a new Email Verification Id to be used with the Verify Email API.
-
#generate_key(key_id, request) ⇒ FusionAuth::ClientResponse
Generate a new RSA or EC key pair or an HMAC secret.
-
#generate_registration_verification_id(email, application_id) ⇒ FusionAuth::ClientResponse
Generate a new Application Registration Verification Id to be used with the Verify Registration API.
-
#generate_two_factor_secret ⇒ FusionAuth::ClientResponse
Generate a Two Factor secret that can be used to enable Two Factor authentication for a User.
-
#generate_two_factor_secret_using_jwt(encoded_jwt) ⇒ FusionAuth::ClientResponse
Generate a Two Factor secret that can be used to enable Two Factor authentication for a User.
-
#identity_provider_login(request) ⇒ FusionAuth::ClientResponse
Handles login via third-parties including Social login, external OAuth and OpenID Connect, and other login systems.
-
#import_key(key_id, request) ⇒ FusionAuth::ClientResponse
Import an existing RSA or EC key pair or an HMAC secret.
-
#import_refresh_tokens(request) ⇒ FusionAuth::ClientResponse
Bulk imports refresh tokens.
-
#import_users(request) ⇒ FusionAuth::ClientResponse
Bulk imports users.
-
#initialize(api_key, base_url) ⇒ FusionAuthClient
constructor
A new instance of FusionAuthClient.
-
#introspect_access_token(client_id, token) ⇒ FusionAuth::ClientResponse
Inspect an access token issued by FusionAuth.
-
#issue_jwt(application_id, encoded_jwt, refresh_token) ⇒ FusionAuth::ClientResponse
Issue a new access token (JWT) for the requested Application after ensuring the provided JWT is valid.
-
#login(request) ⇒ FusionAuth::ClientResponse
Authenticates a user to FusionAuth.
-
#login_ping(user_id, application_id, caller_ip_address) ⇒ FusionAuth::ClientResponse
Sends a ping to FusionAuth indicating that the user was automatically logged into an application.
-
#logout(global, refresh_token) ⇒ FusionAuth::ClientResponse
The Logout API is intended to be used to remove the refresh token and access token cookies if they exist on the client and revoke the refresh token stored.
-
#lookup_identity_provider(domain) ⇒ FusionAuth::ClientResponse
Retrieves the identity provider for the given domain.
-
#modify_action(action_id, request) ⇒ FusionAuth::ClientResponse
Modifies a temporal user action by changing the expiration of the action and optionally adding a comment to the action.
-
#passwordless_login(request) ⇒ FusionAuth::ClientResponse
Complete a login request using a passwordless code.
-
#patch_application(application_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the application with the given Id.
-
#patch_application_role(application_id, role_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the application role with the given id for the application.
-
#patch_connector(connector_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the connector with the given Id.
-
#patch_consent(consent_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the consent with the given Id.
-
#patch_email_template(email_template_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the email template with the given Id.
-
#patch_group(group_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the group with the given Id.
-
#patch_identity_provider(identity_provider_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the identity provider with the given Id.
-
#patch_integrations(request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the available integrations.
-
#patch_lambda(lambda_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the lambda with the given Id.
-
#patch_registration(user_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the registration for the user with the given id and the application defined in the request.
-
#patch_system_configuration(request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the system configuration.
-
#patch_tenant(tenant_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the tenant with the given Id.
-
#patch_theme(theme_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the theme with the given Id.
-
#patch_user(user_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the user with the given Id.
-
#patch_user_action(user_action_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the user action with the given Id.
-
#patch_user_action_reason(user_action_reason_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the user action reason with the given Id.
-
#patch_user_consent(user_consent_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, a single User consent by Id.
-
#reactivate_application(application_id) ⇒ FusionAuth::ClientResponse
Reactivates the application with the given Id.
-
#reactivate_user(user_id) ⇒ FusionAuth::ClientResponse
Reactivates the user with the given Id.
-
#reactivate_user_action(user_action_id) ⇒ FusionAuth::ClientResponse
Reactivates the user action with the given Id.
-
#reconcile_jwt(request) ⇒ FusionAuth::ClientResponse
Reconcile a User to FusionAuth using JWT issued from another Identity Provider.
-
#refresh_user_search_index ⇒ FusionAuth::ClientResponse
Request a refresh of the User search index.
-
#register(user_id, request) ⇒ FusionAuth::ClientResponse
Registers a user for an application.
-
#remove_user_from_family(family_id, user_id) ⇒ FusionAuth::ClientResponse
Removes a user from the family with the given id.
-
#resend_email_verification(email) ⇒ FusionAuth::ClientResponse
Re-sends the verification email to the user.
-
#resend_email_verification_with_application_template(application_id, email) ⇒ FusionAuth::ClientResponse
Re-sends the verification email to the user.
-
#resend_registration_verification(email, application_id) ⇒ FusionAuth::ClientResponse
Re-sends the application registration verification email to the user.
-
#retrieve_action(action_id) ⇒ FusionAuth::ClientResponse
Retrieves a single action log (the log of a user action that was taken on a user previously) for the given Id.
-
#retrieve_actions(user_id) ⇒ FusionAuth::ClientResponse
Retrieves all of the actions for the user with the given Id.
-
#retrieve_actions_preventing_login(user_id) ⇒ FusionAuth::ClientResponse
Retrieves all of the actions for the user with the given Id that are currently preventing the User from logging in.
-
#retrieve_active_actions(user_id) ⇒ FusionAuth::ClientResponse
Retrieves all of the actions for the user with the given Id that are currently active.
-
#retrieve_application(application_id) ⇒ FusionAuth::ClientResponse
Retrieves the application for the given id or all of the applications if the id is null.
-
#retrieve_applications ⇒ FusionAuth::ClientResponse
Retrieves all of the applications.
-
#retrieve_audit_log(audit_log_id) ⇒ FusionAuth::ClientResponse
Retrieves a single audit log for the given Id.
-
#retrieve_connector(connector_id) ⇒ FusionAuth::ClientResponse
Retrieves the connector with the given Id.
-
#retrieve_connectors ⇒ FusionAuth::ClientResponse
Retrieves all of the connectors.
-
#retrieve_consent(consent_id) ⇒ FusionAuth::ClientResponse
Retrieves the Consent for the given Id.
-
#retrieve_consents ⇒ FusionAuth::ClientResponse
Retrieves all of the consent.
-
#retrieve_daily_active_report(application_id, start, _end) ⇒ FusionAuth::ClientResponse
Retrieves the daily active user report between the two instants.
-
#retrieve_email_template(email_template_id) ⇒ FusionAuth::ClientResponse
Retrieves the email template for the given Id.
-
#retrieve_email_template_preview(request) ⇒ FusionAuth::ClientResponse
Creates a preview of the email template provided in the request.
-
#retrieve_email_templates ⇒ FusionAuth::ClientResponse
Retrieves all of the email templates.
-
#retrieve_event_log(event_log_id) ⇒ FusionAuth::ClientResponse
Retrieves a single event log for the given Id.
-
#retrieve_families(user_id) ⇒ FusionAuth::ClientResponse
Retrieves all of the families that a user belongs to.
-
#retrieve_family_members_by_family_id(family_id) ⇒ FusionAuth::ClientResponse
Retrieves all of the members of a family by the unique Family Id.
-
#retrieve_form(form_id) ⇒ FusionAuth::ClientResponse
Retrieves the form with the given Id.
-
#retrieve_form_field(field_id) ⇒ FusionAuth::ClientResponse
Retrieves the form field with the given Id.
-
#retrieve_form_fields ⇒ FusionAuth::ClientResponse
Retrieves all of the forms fields.
-
#retrieve_forms ⇒ FusionAuth::ClientResponse
Retrieves all of the forms.
-
#retrieve_group(group_id) ⇒ FusionAuth::ClientResponse
Retrieves the group for the given Id.
-
#retrieve_groups ⇒ FusionAuth::ClientResponse
Retrieves all of the groups.
-
#retrieve_identity_provider(identity_provider_id) ⇒ FusionAuth::ClientResponse
Retrieves the identity provider for the given id or all of the identity providers if the id is null.
-
#retrieve_identity_provider_by_type(type) ⇒ FusionAuth::ClientResponse
Retrieves one or more identity provider for the given type.
-
#retrieve_identity_providers ⇒ FusionAuth::ClientResponse
Retrieves all of the identity providers.
-
#retrieve_inactive_actions(user_id) ⇒ FusionAuth::ClientResponse
Retrieves all of the actions for the user with the given Id that are currently inactive.
-
#retrieve_inactive_applications ⇒ FusionAuth::ClientResponse
Retrieves all of the applications that are currently inactive.
-
#retrieve_inactive_user_actions ⇒ FusionAuth::ClientResponse
Retrieves all of the user actions that are currently inactive.
-
#retrieve_integration ⇒ FusionAuth::ClientResponse
Retrieves the available integrations.
-
#retrieve_json_web_key_set ⇒ FusionAuth::ClientResponse
Returns public keys used by FusionAuth to cryptographically verify JWTs using the JSON Web Key format.
-
#retrieve_jwt_public_key(key_id) ⇒ FusionAuth::ClientResponse
Retrieves the Public Key configured for verifying JSON Web Tokens (JWT) by the key Id (kid).
-
#retrieve_jwt_public_key_by_application_id(application_id) ⇒ FusionAuth::ClientResponse
Retrieves the Public Key configured for verifying the JSON Web Tokens (JWT) issued by the Login API by the Application Id.
-
#retrieve_jwt_public_keys ⇒ FusionAuth::ClientResponse
Retrieves all Public Keys configured for verifying JSON Web Tokens (JWT).
-
#retrieve_key(key_id) ⇒ FusionAuth::ClientResponse
Retrieves the key for the given Id.
-
#retrieve_keys ⇒ FusionAuth::ClientResponse
Retrieves all of the keys.
-
#retrieve_lambda(lambda_id) ⇒ FusionAuth::ClientResponse
Retrieves the lambda for the given Id.
-
#retrieve_lambdas ⇒ FusionAuth::ClientResponse
Retrieves all of the lambdas.
-
#retrieve_lambdas_by_type(type) ⇒ FusionAuth::ClientResponse
Retrieves all of the lambdas for the provided type.
-
#retrieve_login_report(application_id, start, _end) ⇒ FusionAuth::ClientResponse
Retrieves the login report between the two instants.
-
#retrieve_monthly_active_report(application_id, start, _end) ⇒ FusionAuth::ClientResponse
Retrieves the monthly active user report between the two instants.
-
#retrieve_oauth_configuration(application_id) ⇒ FusionAuth::ClientResponse
Retrieves the Oauth2 configuration for the application for the given Application Id.
-
#retrieve_open_id_configuration ⇒ FusionAuth::ClientResponse
Returns the well known OpenID Configuration JSON document.
-
#retrieve_password_validation_rules ⇒ FusionAuth::ClientResponse
Retrieves the password validation rules for a specific tenant.
-
#retrieve_password_validation_rules_with_tenant_id(tenant_id) ⇒ FusionAuth::ClientResponse
Retrieves the password validation rules for a specific tenant.
-
#retrieve_pending_children(parent_email) ⇒ FusionAuth::ClientResponse
Retrieves all of the children for the given parent email address.
-
#retrieve_recent_logins(offset, limit) ⇒ FusionAuth::ClientResponse
Retrieves the last number of login records.
-
#retrieve_refresh_token_by_id(user_id) ⇒ FusionAuth::ClientResponse
Retrieves a single refresh token by unique Id.
-
#retrieve_refresh_tokens(user_id) ⇒ FusionAuth::ClientResponse
Retrieves the refresh tokens that belong to the user with the given Id.
-
#retrieve_registration(user_id, application_id) ⇒ FusionAuth::ClientResponse
Retrieves the user registration for the user with the given id and the given application id.
-
#retrieve_registration_report(application_id, start, _end) ⇒ FusionAuth::ClientResponse
Retrieves the registration report between the two instants.
-
#retrieve_system_configuration ⇒ FusionAuth::ClientResponse
Retrieves the system configuration.
-
#retrieve_tenant(tenant_id) ⇒ FusionAuth::ClientResponse
Retrieves the tenant for the given Id.
-
#retrieve_tenants ⇒ FusionAuth::ClientResponse
Retrieves all of the tenants.
-
#retrieve_theme(theme_id) ⇒ FusionAuth::ClientResponse
Retrieves the theme for the given Id.
-
#retrieve_themes ⇒ FusionAuth::ClientResponse
Retrieves all of the themes.
-
#retrieve_total_report ⇒ FusionAuth::ClientResponse
Retrieves the totals report.
-
#retrieve_user(user_id) ⇒ FusionAuth::ClientResponse
Retrieves the user for the given Id.
-
#retrieve_user_action(user_action_id) ⇒ FusionAuth::ClientResponse
Retrieves the user action for the given Id.
-
#retrieve_user_action_reason(user_action_reason_id) ⇒ FusionAuth::ClientResponse
Retrieves the user action reason for the given Id.
-
#retrieve_user_action_reasons ⇒ FusionAuth::ClientResponse
Retrieves all the user action reasons.
-
#retrieve_user_actions ⇒ FusionAuth::ClientResponse
Retrieves all of the user actions.
-
#retrieve_user_by_change_password_id(change_password_id) ⇒ FusionAuth::ClientResponse
Retrieves the user by a change password Id.
-
#retrieve_user_by_email(email) ⇒ FusionAuth::ClientResponse
Retrieves the user for the given email.
-
#retrieve_user_by_login_id(login_id) ⇒ FusionAuth::ClientResponse
Retrieves the user for the loginId.
-
#retrieve_user_by_username(username) ⇒ FusionAuth::ClientResponse
Retrieves the user for the given username.
-
#retrieve_user_by_verification_id(verification_id) ⇒ FusionAuth::ClientResponse
Retrieves the user by a verificationId.
-
#retrieve_user_comments(user_id) ⇒ FusionAuth::ClientResponse
Retrieves all of the comments for the user with the given Id.
-
#retrieve_user_consent(user_consent_id) ⇒ FusionAuth::ClientResponse
Retrieve a single User consent by Id.
-
#retrieve_user_consents(user_id) ⇒ FusionAuth::ClientResponse
Retrieves all of the consents for a User.
-
#retrieve_user_info_from_access_token(encoded_jwt) ⇒ FusionAuth::ClientResponse
Call the UserInfo endpoint to retrieve User Claims from the access token issued by FusionAuth.
-
#retrieve_user_login_report(application_id, user_id, start, _end) ⇒ FusionAuth::ClientResponse
Retrieves the login report between the two instants for a particular user by Id.
-
#retrieve_user_login_report_by_login_id(application_id, login_id, start, _end) ⇒ FusionAuth::ClientResponse
Retrieves the login report between the two instants for a particular user by login Id.
-
#retrieve_user_recent_logins(user_id, offset, limit) ⇒ FusionAuth::ClientResponse
Retrieves the last number of login records for a user.
-
#retrieve_user_using_jwt(encoded_jwt) ⇒ FusionAuth::ClientResponse
Retrieves the user for the given Id.
-
#retrieve_webhook(webhook_id) ⇒ FusionAuth::ClientResponse
Retrieves the webhook for the given Id.
-
#retrieve_webhooks ⇒ FusionAuth::ClientResponse
Retrieves all the webhooks.
-
#revoke_refresh_token(token, user_id, application_id) ⇒ FusionAuth::ClientResponse
Revokes refresh tokens.
-
#revoke_refresh_token_by_id(token_id) ⇒ FusionAuth::ClientResponse
Revokes a single refresh token by the unique Id.
-
#revoke_refresh_token_by_token(token) ⇒ FusionAuth::ClientResponse
Revokes a single refresh token by using the actual refresh token value.
-
#revoke_refresh_tokens_by_application_id(application_id) ⇒ FusionAuth::ClientResponse
Revoke all refresh tokens that belong to an application by applicationId.
-
#revoke_refresh_tokens_by_user_id(user_id) ⇒ FusionAuth::ClientResponse
Revoke all refresh tokens that belong to a user by user Id.
-
#revoke_refresh_tokens_by_user_id_for_application(user_id, application_id) ⇒ FusionAuth::ClientResponse
Revoke all refresh tokens that belong to a user by user Id for a specific application by applicationId.
-
#revoke_user_consent(user_consent_id) ⇒ FusionAuth::ClientResponse
Revokes a single User consent by Id.
-
#search_audit_logs(request) ⇒ FusionAuth::ClientResponse
Searches the audit logs with the specified criteria and pagination.
-
#search_event_logs(request) ⇒ FusionAuth::ClientResponse
Searches the event logs with the specified criteria and pagination.
-
#search_login_records(request) ⇒ FusionAuth::ClientResponse
Searches the login records with the specified criteria and pagination.
-
#search_users(ids) ⇒ FusionAuth::ClientResponse
deprecated
Deprecated.
This method has been renamed to search_users_by_ids, use that method instead.
-
#search_users_by_ids(ids) ⇒ FusionAuth::ClientResponse
Retrieves the users for the given ids.
-
#search_users_by_query(request) ⇒ FusionAuth::ClientResponse
Retrieves the users for the given search criteria and pagination.
-
#search_users_by_query_string(request) ⇒ FusionAuth::ClientResponse
deprecated
Deprecated.
This method has been renamed to search_users_by_query, use that method instead.
-
#send_email(email_template_id, request) ⇒ FusionAuth::ClientResponse
Send an email using an email template id.
-
#send_family_request_email(request) ⇒ FusionAuth::ClientResponse
Sends out an email to a parent that they need to register and create a family or need to log in and add a child to their existing family.
-
#send_passwordless_code(request) ⇒ FusionAuth::ClientResponse
Send a passwordless authentication code in an email to complete login.
-
#send_two_factor_code(request) ⇒ FusionAuth::ClientResponse
Send a Two Factor authentication code to assist in setting up Two Factor authentication or disabling.
-
#send_two_factor_code_for_login(two_factor_id) ⇒ FusionAuth::ClientResponse
Send a Two Factor authentication code to allow the completion of Two Factor authentication.
- #set_tenant_id(tenant_id) ⇒ Object
-
#start_identity_provider_login(request) ⇒ FusionAuth::ClientResponse
Begins a login request for a 3rd party login that requires user interaction such as HYPR.
-
#start_passwordless_login(request) ⇒ FusionAuth::ClientResponse
Start a passwordless login request by generating a passwordless code.
-
#two_factor_login(request) ⇒ FusionAuth::ClientResponse
Complete login using a 2FA challenge.
-
#update_application(application_id, request) ⇒ FusionAuth::ClientResponse
Updates the application with the given Id.
-
#update_application_role(application_id, role_id, request) ⇒ FusionAuth::ClientResponse
Updates the application role with the given id for the application.
-
#update_connector(connector_id, request) ⇒ FusionAuth::ClientResponse
Updates the connector with the given Id.
-
#update_consent(consent_id, request) ⇒ FusionAuth::ClientResponse
Updates the consent with the given Id.
-
#update_email_template(email_template_id, request) ⇒ FusionAuth::ClientResponse
Updates the email template with the given Id.
-
#update_form(form_id, request) ⇒ FusionAuth::ClientResponse
Updates the form with the given Id.
-
#update_form_field(field_id, request) ⇒ FusionAuth::ClientResponse
Updates the form field with the given Id.
-
#update_group(group_id, request) ⇒ FusionAuth::ClientResponse
Updates the group with the given Id.
-
#update_identity_provider(identity_provider_id, request) ⇒ FusionAuth::ClientResponse
Updates the identity provider with the given Id.
-
#update_integrations(request) ⇒ FusionAuth::ClientResponse
Updates the available integrations.
-
#update_key(key_id, request) ⇒ FusionAuth::ClientResponse
Updates the key with the given Id.
-
#update_lambda(lambda_id, request) ⇒ FusionAuth::ClientResponse
Updates the lambda with the given Id.
-
#update_registration(user_id, request) ⇒ FusionAuth::ClientResponse
Updates the registration for the user with the given id and the application defined in the request.
-
#update_system_configuration(request) ⇒ FusionAuth::ClientResponse
Updates the system configuration.
-
#update_tenant(tenant_id, request) ⇒ FusionAuth::ClientResponse
Updates the tenant with the given Id.
-
#update_theme(theme_id, request) ⇒ FusionAuth::ClientResponse
Updates the theme with the given Id.
-
#update_user(user_id, request) ⇒ FusionAuth::ClientResponse
Updates the user with the given Id.
-
#update_user_action(user_action_id, request) ⇒ FusionAuth::ClientResponse
Updates the user action with the given Id.
-
#update_user_action_reason(user_action_reason_id, request) ⇒ FusionAuth::ClientResponse
Updates the user action reason with the given Id.
-
#update_user_consent(user_consent_id, request) ⇒ FusionAuth::ClientResponse
Updates a single User consent by Id.
-
#update_webhook(webhook_id, request) ⇒ FusionAuth::ClientResponse
Updates the webhook with the given Id.
-
#validate_device(user_code, client_id) ⇒ FusionAuth::ClientResponse
Validates the end-user provided user_code from the user-interaction of the Device Authorization Grant.
-
#validate_jwt(encoded_jwt) ⇒ FusionAuth::ClientResponse
Validates the provided JWT (encoded JWT string) to ensure the token is valid.
-
#verify_email(verification_id) ⇒ FusionAuth::ClientResponse
Confirms a email verification.
-
#verify_registration(verification_id) ⇒ FusionAuth::ClientResponse
Confirms an application registration.
Constructor Details
#initialize(api_key, base_url) ⇒ FusionAuthClient
Returns a new instance of FusionAuthClient.
32 33 34 35 36 37 38 |
# File 'lib/fusionauth/fusionauth_client.rb', line 32 def initialize(api_key, base_url) @api_key = api_key @base_url = base_url @connect_timeout = 1000 @read_timeout = 2000 @tenant_id = nil end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
30 31 32 |
# File 'lib/fusionauth/fusionauth_client.rb', line 30 def api_key @api_key end |
#base_url ⇒ Object
Returns the value of attribute base_url.
30 31 32 |
# File 'lib/fusionauth/fusionauth_client.rb', line 30 def base_url @base_url end |
#connect_timeout ⇒ Object
Returns the value of attribute connect_timeout.
30 31 32 |
# File 'lib/fusionauth/fusionauth_client.rb', line 30 def connect_timeout @connect_timeout end |
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
30 31 32 |
# File 'lib/fusionauth/fusionauth_client.rb', line 30 def read_timeout @read_timeout end |
#tenant_id ⇒ Object
Returns the value of attribute tenant_id.
30 31 32 |
# File 'lib/fusionauth/fusionauth_client.rb', line 30 def tenant_id @tenant_id end |
Instance Method Details
#action_user(request) ⇒ FusionAuth::ClientResponse
Takes an action on a user. The user being actioned is called the “actionee” and the user taking the action is called the “actioner”. Both user ids are required in the request object.
51 52 53 54 55 56 |
# File 'lib/fusionauth/fusionauth_client.rb', line 51 def action_user(request) start.uri('/api/user/action') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#add_user_to_family(family_id, request) ⇒ FusionAuth::ClientResponse
Adds a user to an existing family. The family id must be specified.
64 65 66 67 68 69 70 |
# File 'lib/fusionauth/fusionauth_client.rb', line 64 def add_user_to_family(family_id, request) start.uri('/api/user/family') .url_segment(family_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#cancel_action(action_id, request) ⇒ FusionAuth::ClientResponse
Cancels the user action.
78 79 80 81 82 83 84 |
# File 'lib/fusionauth/fusionauth_client.rb', line 78 def cancel_action(action_id, request) start.uri('/api/user/action') .url_segment(action_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .delete() .go() end |
#change_password(change_password_id, request) ⇒ FusionAuth::ClientResponse
Changes a user’s password using the change password Id. This usually occurs after an email has been sent to the user and they clicked on a link to reset their password.
93 94 95 96 97 98 99 |
# File 'lib/fusionauth/fusionauth_client.rb', line 93 def change_password(change_password_id, request) start.uri('/api/user/change-password') .url_segment(change_password_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#change_password_by_identity(request) ⇒ FusionAuth::ClientResponse
Changes a user’s password using their identity (login id and password). Using a loginId instead of the changePasswordId bypasses the email verification and allows a password to be changed directly without first calling the #forgotPassword method.
108 109 110 111 112 113 |
# File 'lib/fusionauth/fusionauth_client.rb', line 108 def change_password_by_identity(request) start.uri('/api/user/change-password') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#comment_on_user(request) ⇒ FusionAuth::ClientResponse
Adds a comment to the user’s account.
120 121 122 123 124 125 |
# File 'lib/fusionauth/fusionauth_client.rb', line 120 def comment_on_user(request) start.uri('/api/user/comment') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#create_application(application_id, request) ⇒ FusionAuth::ClientResponse
Creates an application. You can optionally specify an Id for the application, if not provided one will be generated.
133 134 135 136 137 138 139 |
# File 'lib/fusionauth/fusionauth_client.rb', line 133 def create_application(application_id, request) start.uri('/api/application') .url_segment(application_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#create_application_role(application_id, role_id, request) ⇒ FusionAuth::ClientResponse
Creates a new role for an application. You must specify the id of the application you are creating the role for. You can optionally specify an Id for the role inside the ApplicationRole object itself, if not provided one will be generated.
149 150 151 152 153 154 155 156 157 |
# File 'lib/fusionauth/fusionauth_client.rb', line 149 def create_application_role(application_id, role_id, request) start.uri('/api/application') .url_segment(application_id) .url_segment("role") .url_segment(role_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#create_audit_log(request) ⇒ FusionAuth::ClientResponse
Creates an audit log with the message and user name (usually an email). Audit logs should be written anytime you make changes to the FusionAuth database. When using the FusionAuth App web interface, any changes are automatically written to the audit log. However, if you are accessing the API, you must write the audit logs yourself.
166 167 168 169 170 171 |
# File 'lib/fusionauth/fusionauth_client.rb', line 166 def create_audit_log(request) start.uri('/api/system/audit-log') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#create_connector(connector_id, request) ⇒ FusionAuth::ClientResponse
Creates a connector. You can optionally specify an Id for the connector, if not provided one will be generated.
179 180 181 182 183 184 185 |
# File 'lib/fusionauth/fusionauth_client.rb', line 179 def create_connector(connector_id, request) start.uri('/api/connector') .url_segment(connector_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#create_consent(consent_id, request) ⇒ FusionAuth::ClientResponse
Creates a user consent type. You can optionally specify an Id for the consent type, if not provided one will be generated.
193 194 195 196 197 198 199 |
# File 'lib/fusionauth/fusionauth_client.rb', line 193 def (, request) start.uri('/api/consent') .url_segment() .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#create_email_template(email_template_id, request) ⇒ FusionAuth::ClientResponse
Creates an email template. You can optionally specify an Id for the template, if not provided one will be generated.
207 208 209 210 211 212 213 |
# File 'lib/fusionauth/fusionauth_client.rb', line 207 def create_email_template(email_template_id, request) start.uri('/api/email/template') .url_segment(email_template_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#create_family(family_id, request) ⇒ FusionAuth::ClientResponse
Creates a family with the user id in the request as the owner and sole member of the family. You can optionally specify an id for the family, if not provided one will be generated.
222 223 224 225 226 227 228 |
# File 'lib/fusionauth/fusionauth_client.rb', line 222 def create_family(family_id, request) start.uri('/api/user/family') .url_segment(family_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#create_form(form_id, request) ⇒ FusionAuth::ClientResponse
Creates a form. You can optionally specify an Id for the form, if not provided one will be generated.
236 237 238 239 240 241 242 |
# File 'lib/fusionauth/fusionauth_client.rb', line 236 def create_form(form_id, request) start.uri('/api/form') .url_segment(form_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#create_form_field(field_id, request) ⇒ FusionAuth::ClientResponse
Creates a form field. You can optionally specify an Id for the form, if not provided one will be generated.
250 251 252 253 254 255 256 |
# File 'lib/fusionauth/fusionauth_client.rb', line 250 def create_form_field(field_id, request) start.uri('/api/form/field') .url_segment(field_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#create_group(group_id, request) ⇒ FusionAuth::ClientResponse
Creates a group. You can optionally specify an Id for the group, if not provided one will be generated.
264 265 266 267 268 269 270 |
# File 'lib/fusionauth/fusionauth_client.rb', line 264 def create_group(group_id, request) start.uri('/api/group') .url_segment(group_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#create_group_members(request) ⇒ FusionAuth::ClientResponse
Creates a member in a group.
277 278 279 280 281 282 |
# File 'lib/fusionauth/fusionauth_client.rb', line 277 def create_group_members(request) start.uri('/api/group/member') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#create_identity_provider(identity_provider_id, request) ⇒ FusionAuth::ClientResponse
Creates an identity provider. You can optionally specify an Id for the identity provider, if not provided one will be generated.
290 291 292 293 294 295 296 |
# File 'lib/fusionauth/fusionauth_client.rb', line 290 def create_identity_provider(identity_provider_id, request) start.uri('/api/identity-provider') .url_segment(identity_provider_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#create_lambda(lambda_id, request) ⇒ FusionAuth::ClientResponse
Creates a Lambda. You can optionally specify an Id for the lambda, if not provided one will be generated.
304 305 306 307 308 309 310 |
# File 'lib/fusionauth/fusionauth_client.rb', line 304 def create_lambda(lambda_id, request) start.uri('/api/lambda') .url_segment(lambda_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#create_tenant(tenant_id, request) ⇒ FusionAuth::ClientResponse
Creates a tenant. You can optionally specify an Id for the tenant, if not provided one will be generated.
318 319 320 321 322 323 324 |
# File 'lib/fusionauth/fusionauth_client.rb', line 318 def create_tenant(tenant_id, request) start.uri('/api/tenant') .url_segment(tenant_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#create_theme(theme_id, request) ⇒ FusionAuth::ClientResponse
Creates a Theme. You can optionally specify an Id for the theme, if not provided one will be generated.
332 333 334 335 336 337 338 |
# File 'lib/fusionauth/fusionauth_client.rb', line 332 def create_theme(theme_id, request) start.uri('/api/theme') .url_segment(theme_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#create_user(user_id, request) ⇒ FusionAuth::ClientResponse
Creates a user. You can optionally specify an Id for the user, if not provided one will be generated.
346 347 348 349 350 351 352 |
# File 'lib/fusionauth/fusionauth_client.rb', line 346 def create_user(user_id, request) start.uri('/api/user') .url_segment(user_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#create_user_action(user_action_id, request) ⇒ FusionAuth::ClientResponse
Creates a user action. This action cannot be taken on a user until this call successfully returns. Anytime after that the user action can be applied to any user.
361 362 363 364 365 366 367 |
# File 'lib/fusionauth/fusionauth_client.rb', line 361 def create_user_action(user_action_id, request) start.uri('/api/user-action') .url_segment(user_action_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#create_user_action_reason(user_action_reason_id, request) ⇒ FusionAuth::ClientResponse
Creates a user reason. This user action reason cannot be used when actioning a user until this call completes successfully. Anytime after that the user action reason can be used.
376 377 378 379 380 381 382 |
# File 'lib/fusionauth/fusionauth_client.rb', line 376 def create_user_action_reason(user_action_reason_id, request) start.uri('/api/user-action-reason') .url_segment(user_action_reason_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#create_user_consent(user_consent_id, request) ⇒ FusionAuth::ClientResponse
Creates a single User consent.
390 391 392 393 394 395 396 |
# File 'lib/fusionauth/fusionauth_client.rb', line 390 def (, request) start.uri('/api/user/consent') .url_segment() .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#create_webhook(webhook_id, request) ⇒ FusionAuth::ClientResponse
Creates a webhook. You can optionally specify an Id for the webhook, if not provided one will be generated.
404 405 406 407 408 409 410 |
# File 'lib/fusionauth/fusionauth_client.rb', line 404 def create_webhook(webhook_id, request) start.uri('/api/webhook') .url_segment(webhook_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#deactivate_application(application_id) ⇒ FusionAuth::ClientResponse
Deactivates the application with the given Id.
417 418 419 420 421 422 |
# File 'lib/fusionauth/fusionauth_client.rb', line 417 def deactivate_application(application_id) start.uri('/api/application') .url_segment(application_id) .delete() .go() end |
#deactivate_user(user_id) ⇒ FusionAuth::ClientResponse
Deactivates the user with the given Id.
429 430 431 432 433 434 |
# File 'lib/fusionauth/fusionauth_client.rb', line 429 def deactivate_user(user_id) start.uri('/api/user') .url_segment(user_id) .delete() .go() end |
#deactivate_user_action(user_action_id) ⇒ FusionAuth::ClientResponse
Deactivates the user action with the given Id.
441 442 443 444 445 446 |
# File 'lib/fusionauth/fusionauth_client.rb', line 441 def deactivate_user_action(user_action_id) start.uri('/api/user-action') .url_segment(user_action_id) .delete() .go() end |
#deactivate_users(user_ids) ⇒ FusionAuth::ClientResponse
This method has been renamed to deactivate_users_by_ids, use that method instead.
Deactivates the users with the given ids.
454 455 456 457 458 459 460 461 |
# File 'lib/fusionauth/fusionauth_client.rb', line 454 def deactivate_users(user_ids) start.uri('/api/user/bulk') .url_parameter('userId', user_ids) .url_parameter('dryRun', false) .url_parameter('hardDelete', false) .delete() .go() end |
#deactivate_users_by_ids(user_ids) ⇒ FusionAuth::ClientResponse
Deactivates the users with the given ids.
468 469 470 471 472 473 474 475 |
# File 'lib/fusionauth/fusionauth_client.rb', line 468 def deactivate_users_by_ids(user_ids) start.uri('/api/user/bulk') .url_parameter('userId', user_ids) .url_parameter('dryRun', false) .url_parameter('hardDelete', false) .delete() .go() end |
#delete_application(application_id) ⇒ FusionAuth::ClientResponse
Hard deletes an application. This is a dangerous operation and should not be used in most circumstances. This will delete the application, any registrations for that application, metrics and reports for the application, all the roles for the application, and any other data associated with the application. This operation could take a very long time, depending on the amount of data in your database.
485 486 487 488 489 490 491 |
# File 'lib/fusionauth/fusionauth_client.rb', line 485 def delete_application(application_id) start.uri('/api/application') .url_segment(application_id) .url_parameter('hardDelete', true) .delete() .go() end |
#delete_application_role(application_id, role_id) ⇒ FusionAuth::ClientResponse
Hard deletes an application role. This is a dangerous operation and should not be used in most circumstances. This permanently removes the given role from all users that had it.
500 501 502 503 504 505 506 507 |
# File 'lib/fusionauth/fusionauth_client.rb', line 500 def delete_application_role(application_id, role_id) start.uri('/api/application') .url_segment(application_id) .url_segment("role") .url_segment(role_id) .delete() .go() end |
#delete_connector(connector_id) ⇒ FusionAuth::ClientResponse
Deletes the connector for the given Id.
514 515 516 517 518 519 |
# File 'lib/fusionauth/fusionauth_client.rb', line 514 def delete_connector(connector_id) start.uri('/api/connector') .url_segment(connector_id) .delete() .go() end |
#delete_consent(consent_id) ⇒ FusionAuth::ClientResponse
Deletes the consent for the given Id.
526 527 528 529 530 531 |
# File 'lib/fusionauth/fusionauth_client.rb', line 526 def () start.uri('/api/consent') .url_segment() .delete() .go() end |
#delete_email_template(email_template_id) ⇒ FusionAuth::ClientResponse
Deletes the email template for the given Id.
538 539 540 541 542 543 |
# File 'lib/fusionauth/fusionauth_client.rb', line 538 def delete_email_template(email_template_id) start.uri('/api/email/template') .url_segment(email_template_id) .delete() .go() end |
#delete_form(form_id) ⇒ FusionAuth::ClientResponse
Deletes the form for the given Id.
550 551 552 553 554 555 |
# File 'lib/fusionauth/fusionauth_client.rb', line 550 def delete_form(form_id) start.uri('/api/form') .url_segment(form_id) .delete() .go() end |
#delete_form_field(field_id) ⇒ FusionAuth::ClientResponse
Deletes the form field for the given Id.
562 563 564 565 566 567 |
# File 'lib/fusionauth/fusionauth_client.rb', line 562 def delete_form_field(field_id) start.uri('/api/form/field') .url_segment(field_id) .delete() .go() end |
#delete_group(group_id) ⇒ FusionAuth::ClientResponse
Deletes the group for the given Id.
574 575 576 577 578 579 |
# File 'lib/fusionauth/fusionauth_client.rb', line 574 def delete_group(group_id) start.uri('/api/group') .url_segment(group_id) .delete() .go() end |
#delete_group_members(request) ⇒ FusionAuth::ClientResponse
Removes users as members of a group.
586 587 588 589 590 591 |
# File 'lib/fusionauth/fusionauth_client.rb', line 586 def delete_group_members(request) start.uri('/api/group/member') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .delete() .go() end |
#delete_identity_provider(identity_provider_id) ⇒ FusionAuth::ClientResponse
Deletes the identity provider for the given Id.
598 599 600 601 602 603 |
# File 'lib/fusionauth/fusionauth_client.rb', line 598 def delete_identity_provider(identity_provider_id) start.uri('/api/identity-provider') .url_segment(identity_provider_id) .delete() .go() end |
#delete_key(key_id) ⇒ FusionAuth::ClientResponse
Deletes the key for the given Id.
610 611 612 613 614 615 |
# File 'lib/fusionauth/fusionauth_client.rb', line 610 def delete_key(key_id) start.uri('/api/key') .url_segment(key_id) .delete() .go() end |
#delete_lambda(lambda_id) ⇒ FusionAuth::ClientResponse
Deletes the lambda for the given Id.
622 623 624 625 626 627 |
# File 'lib/fusionauth/fusionauth_client.rb', line 622 def delete_lambda(lambda_id) start.uri('/api/lambda') .url_segment(lambda_id) .delete() .go() end |
#delete_registration(user_id, application_id) ⇒ FusionAuth::ClientResponse
Deletes the user registration for the given user and application.
635 636 637 638 639 640 641 |
# File 'lib/fusionauth/fusionauth_client.rb', line 635 def delete_registration(user_id, application_id) start.uri('/api/user/registration') .url_segment(user_id) .url_segment(application_id) .delete() .go() end |
#delete_tenant(tenant_id) ⇒ FusionAuth::ClientResponse
Deletes the tenant for the given Id.
648 649 650 651 652 653 |
# File 'lib/fusionauth/fusionauth_client.rb', line 648 def delete_tenant(tenant_id) start.uri('/api/tenant') .url_segment(tenant_id) .delete() .go() end |
#delete_tenant_async(tenant_id) ⇒ FusionAuth::ClientResponse
Deletes the tenant for the given Id asynchronously. This method is helpful if you do not want to wait for the delete operation to complete.
661 662 663 664 665 666 667 |
# File 'lib/fusionauth/fusionauth_client.rb', line 661 def delete_tenant_async(tenant_id) start.uri('/api/tenant') .url_segment(tenant_id) .url_parameter('async', true) .delete() .go() end |
#delete_theme(theme_id) ⇒ FusionAuth::ClientResponse
Deletes the theme for the given Id.
674 675 676 677 678 679 |
# File 'lib/fusionauth/fusionauth_client.rb', line 674 def delete_theme(theme_id) start.uri('/api/theme') .url_segment(theme_id) .delete() .go() end |
#delete_user(user_id) ⇒ FusionAuth::ClientResponse
Deletes the user for the given Id. This permanently deletes all information, metrics, reports and data associated with the user.
687 688 689 690 691 692 693 |
# File 'lib/fusionauth/fusionauth_client.rb', line 687 def delete_user(user_id) start.uri('/api/user') .url_segment(user_id) .url_parameter('hardDelete', true) .delete() .go() end |
#delete_user_action(user_action_id) ⇒ FusionAuth::ClientResponse
Deletes the user action for the given Id. This permanently deletes the user action and also any history and logs of the action being applied to any users.
701 702 703 704 705 706 707 |
# File 'lib/fusionauth/fusionauth_client.rb', line 701 def delete_user_action(user_action_id) start.uri('/api/user-action') .url_segment(user_action_id) .url_parameter('hardDelete', true) .delete() .go() end |
#delete_user_action_reason(user_action_reason_id) ⇒ FusionAuth::ClientResponse
Deletes the user action reason for the given Id.
714 715 716 717 718 719 |
# File 'lib/fusionauth/fusionauth_client.rb', line 714 def delete_user_action_reason(user_action_reason_id) start.uri('/api/user-action-reason') .url_segment(user_action_reason_id) .delete() .go() end |
#delete_users(request) ⇒ FusionAuth::ClientResponse
This method has been renamed to delete_users_by_query, use that method instead.
Deletes the users with the given ids, or users matching the provided JSON query or queryString. The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request.
This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body. Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users.
731 732 733 734 735 736 |
# File 'lib/fusionauth/fusionauth_client.rb', line 731 def delete_users(request) start.uri('/api/user/bulk') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .delete() .go() end |
#delete_users_by_query(request) ⇒ FusionAuth::ClientResponse
Deletes the users with the given ids, or users matching the provided JSON query or queryString. The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request.
This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body. Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users.
747 748 749 750 751 752 |
# File 'lib/fusionauth/fusionauth_client.rb', line 747 def delete_users_by_query(request) start.uri('/api/user/bulk') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .delete() .go() end |
#delete_webhook(webhook_id) ⇒ FusionAuth::ClientResponse
Deletes the webhook for the given Id.
759 760 761 762 763 764 |
# File 'lib/fusionauth/fusionauth_client.rb', line 759 def delete_webhook(webhook_id) start.uri('/api/webhook') .url_segment(webhook_id) .delete() .go() end |
#disable_two_factor(user_id, code) ⇒ FusionAuth::ClientResponse
Disable Two Factor authentication for a user.
772 773 774 775 776 777 778 |
# File 'lib/fusionauth/fusionauth_client.rb', line 772 def disable_two_factor(user_id, code) start.uri('/api/user/two-factor') .url_parameter('userId', user_id) .url_parameter('code', code) .delete() .go() end |
#enable_two_factor(user_id, request) ⇒ FusionAuth::ClientResponse
Enable Two Factor authentication for a user.
786 787 788 789 790 791 792 |
# File 'lib/fusionauth/fusionauth_client.rb', line 786 def enable_two_factor(user_id, request) start.uri('/api/user/two-factor') .url_segment(user_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#exchange_o_auth_code_for_access_token(code, client_id, client_secret, redirect_uri) ⇒ FusionAuth::ClientResponse
Exchanges an OAuth authorization code for an access token. Makes a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint for an access token.
803 804 805 806 807 808 809 810 811 812 813 814 815 |
# File 'lib/fusionauth/fusionauth_client.rb', line 803 def exchange_o_auth_code_for_access_token(code, client_id, client_secret, redirect_uri) body = { "code" => code, "client_id" => client_id, "client_secret" => client_secret, "grant_type" => "authorization_code", "redirect_uri" => redirect_uri } startAnonymous.uri('/oauth2/token') .body_handler(FusionAuth::FormDataBodyHandler.new(body)) .post() .go() end |
#exchange_o_auth_code_for_access_token_using_pkce(code, client_id, client_secret, redirect_uri, code_verifier) ⇒ FusionAuth::ClientResponse
Exchanges an OAuth authorization code and code_verifier for an access token. Makes a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint and a code_verifier for an access token.
827 828 829 830 831 832 833 834 835 836 837 838 839 840 |
# File 'lib/fusionauth/fusionauth_client.rb', line 827 def exchange_o_auth_code_for_access_token_using_pkce(code, client_id, client_secret, redirect_uri, code_verifier) body = { "code" => code, "client_id" => client_id, "client_secret" => client_secret, "grant_type" => "authorization_code", "redirect_uri" => redirect_uri, "code_verifier" => code_verifier } startAnonymous.uri('/oauth2/token') .body_handler(FusionAuth::FormDataBodyHandler.new(body)) .post() .go() end |
#exchange_refresh_token_for_access_token(refresh_token, client_id, client_secret, scope, user_code) ⇒ FusionAuth::ClientResponse
Exchange a Refresh Token for an Access Token. If you will be using the Refresh Token Grant, you will make a request to the Token endpoint to exchange the user’s refresh token for an access token.
852 853 854 855 856 857 858 859 860 861 862 863 864 865 |
# File 'lib/fusionauth/fusionauth_client.rb', line 852 def exchange_refresh_token_for_access_token(refresh_token, client_id, client_secret, scope, user_code) body = { "refresh_token" => refresh_token, "client_id" => client_id, "client_secret" => client_secret, "grant_type" => "refresh_token", "scope" => scope, "user_code" => user_code } startAnonymous.uri('/oauth2/token') .body_handler(FusionAuth::FormDataBodyHandler.new(body)) .post() .go() end |
#exchange_refresh_token_for_jwt(request) ⇒ FusionAuth::ClientResponse
Exchange a refresh token for a new JWT.
872 873 874 875 876 877 |
# File 'lib/fusionauth/fusionauth_client.rb', line 872 def exchange_refresh_token_for_jwt(request) startAnonymous.uri('/api/jwt/refresh') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#exchange_user_credentials_for_access_token(username, password, client_id, client_secret, scope, user_code) ⇒ FusionAuth::ClientResponse
Exchange User Credentials for a Token. If you will be using the Resource Owner Password Credential Grant, you will make a request to the Token endpoint to exchange the user’s email and password for an access token.
890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 |
# File 'lib/fusionauth/fusionauth_client.rb', line 890 def exchange_user_credentials_for_access_token(username, password, client_id, client_secret, scope, user_code) body = { "username" => username, "password" => password, "client_id" => client_id, "client_secret" => client_secret, "grant_type" => "password", "scope" => scope, "user_code" => user_code } startAnonymous.uri('/oauth2/token') .body_handler(FusionAuth::FormDataBodyHandler.new(body)) .post() .go() end |
#forgot_password(request) ⇒ FusionAuth::ClientResponse
Begins the forgot password sequence, which kicks off an email to the user so that they can reset their password.
911 912 913 914 915 916 |
# File 'lib/fusionauth/fusionauth_client.rb', line 911 def forgot_password(request) start.uri('/api/user/forgot-password') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#generate_email_verification_id(email) ⇒ FusionAuth::ClientResponse
Generate a new Email Verification Id to be used with the Verify Email API. This API will not attempt to send an email to the User. This API may be used to collect the verificationId for use with a third party system.
924 925 926 927 928 929 930 |
# File 'lib/fusionauth/fusionauth_client.rb', line 924 def generate_email_verification_id(email) start.uri('/api/user/verify-email') .url_parameter('email', email) .url_parameter('sendVerifyEmail', false) .put() .go() end |
#generate_key(key_id, request) ⇒ FusionAuth::ClientResponse
Generate a new RSA or EC key pair or an HMAC secret.
938 939 940 941 942 943 944 |
# File 'lib/fusionauth/fusionauth_client.rb', line 938 def generate_key(key_id, request) start.uri('/api/key/generate') .url_segment(key_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#generate_registration_verification_id(email, application_id) ⇒ FusionAuth::ClientResponse
Generate a new Application Registration Verification Id to be used with the Verify Registration API. This API will not attempt to send an email to the User. This API may be used to collect the verificationId for use with a third party system.
953 954 955 956 957 958 959 960 |
# File 'lib/fusionauth/fusionauth_client.rb', line 953 def generate_registration_verification_id(email, application_id) start.uri('/api/user/verify-registration') .url_parameter('email', email) .url_parameter('sendVerifyPasswordEmail', false) .url_parameter('applicationId', application_id) .put() .go() end |
#generate_two_factor_secret ⇒ FusionAuth::ClientResponse
Generate a Two Factor secret that can be used to enable Two Factor authentication for a User. The response will contain both the secret and a Base32 encoded form of the secret which can be shown to a User when using a 2 Step Authentication application such as Google Authenticator.
968 969 970 971 972 |
# File 'lib/fusionauth/fusionauth_client.rb', line 968 def generate_two_factor_secret() start.uri('/api/two-factor/secret') .get() .go() end |
#generate_two_factor_secret_using_jwt(encoded_jwt) ⇒ FusionAuth::ClientResponse
Generate a Two Factor secret that can be used to enable Two Factor authentication for a User. The response will contain both the secret and a Base32 encoded form of the secret which can be shown to a User when using a 2 Step Authentication application such as Google Authenticator.
981 982 983 984 985 986 |
# File 'lib/fusionauth/fusionauth_client.rb', line 981 def generate_two_factor_secret_using_jwt(encoded_jwt) startAnonymous.uri('/api/two-factor/secret') .('Bearer ' + encoded_jwt) .get() .go() end |
#identity_provider_login(request) ⇒ FusionAuth::ClientResponse
Handles login via third-parties including Social login, external OAuth and OpenID Connect, and other login systems.
995 996 997 998 999 1000 |
# File 'lib/fusionauth/fusionauth_client.rb', line 995 def identity_provider_login(request) startAnonymous.uri('/api/identity-provider/login') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#import_key(key_id, request) ⇒ FusionAuth::ClientResponse
Import an existing RSA or EC key pair or an HMAC secret.
1008 1009 1010 1011 1012 1013 1014 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1008 def import_key(key_id, request) start.uri('/api/key/import') .url_segment(key_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#import_refresh_tokens(request) ⇒ FusionAuth::ClientResponse
Bulk imports refresh tokens. This request performs minimal validation and runs batch inserts of refresh tokens with the expectation that each token represents a user that already exists and is registered for the corresponding FusionAuth Application. This is done to increases the insert performance.
Therefore, if you encounter an error due to a database key violation, the response will likely offer a generic explanation. If you encounter an error, you may optionally enable additional validation to receive a JSON response body with specific validation errors. This will slow the request down but will allow you to identify the cause of the failure. See the validateDbConstraints request parameter.
1028 1029 1030 1031 1032 1033 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1028 def import_refresh_tokens(request) start.uri('/api/user/refresh-token/import') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#import_users(request) ⇒ FusionAuth::ClientResponse
Bulk imports users. This request performs minimal validation and runs batch inserts of users with the expectation that each user does not yet exist and each registration corresponds to an existing FusionAuth Application. This is done to increases the insert performance.
Therefore, if you encounter an error due to a database key violation, the response will likely offer a generic explanation. If you encounter an error, you may optionally enable additional validation to receive a JSON response body with specific validation errors. This will slow the request down but will allow you to identify the cause of the failure. See the validateDbConstraints request parameter.
1047 1048 1049 1050 1051 1052 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1047 def import_users(request) start.uri('/api/user/import') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#introspect_access_token(client_id, token) ⇒ FusionAuth::ClientResponse
Inspect an access token issued by FusionAuth.
1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1060 def introspect_access_token(client_id, token) body = { "client_id" => client_id, "token" => token } startAnonymous.uri('/oauth2/introspect') .body_handler(FusionAuth::FormDataBodyHandler.new(body)) .post() .go() end |
#issue_jwt(application_id, encoded_jwt, refresh_token) ⇒ FusionAuth::ClientResponse
Issue a new access token (JWT) for the requested Application after ensuring the provided JWT is valid. A valid access token is properly signed and not expired. <p> This API may be used in an SSO configuration to issue new tokens for another application after the user has obtained a valid token from authentication.
1084 1085 1086 1087 1088 1089 1090 1091 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1084 def issue_jwt(application_id, encoded_jwt, refresh_token) startAnonymous.uri('/api/jwt/issue') .('Bearer ' + encoded_jwt) .url_parameter('applicationId', application_id) .url_parameter('refreshToken', refresh_token) .get() .go() end |
#login(request) ⇒ FusionAuth::ClientResponse
Authenticates a user to FusionAuth.
This API optionally requires an API key. See Application.loginConfiguration.requireAuthentication
.
1100 1101 1102 1103 1104 1105 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1100 def login(request) start.uri('/api/login') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#login_ping(user_id, application_id, caller_ip_address) ⇒ FusionAuth::ClientResponse
Sends a ping to FusionAuth indicating that the user was automatically logged into an application. When using FusionAuth’s SSO or your own, you should call this if the user is already logged in centrally, but accesses an application where they no longer have a session. This helps correctly track login counts, times and helps with reporting.
1118 1119 1120 1121 1122 1123 1124 1125 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1118 def login_ping(user_id, application_id, caller_ip_address) start.uri('/api/login') .url_segment(user_id) .url_segment(application_id) .url_parameter('ipAddress', caller_ip_address) .put() .go() end |
#logout(global, refresh_token) ⇒ FusionAuth::ClientResponse
The Logout API is intended to be used to remove the refresh token and access token cookies if they exist on the client and revoke the refresh token stored. This API does nothing if the request does not contain an access token or refresh token cookies.
1137 1138 1139 1140 1141 1142 1143 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1137 def logout(global, refresh_token) startAnonymous.uri('/api/logout') .url_parameter('global', global) .url_parameter('refreshToken', refresh_token) .post() .go() end |
#lookup_identity_provider(domain) ⇒ FusionAuth::ClientResponse
Retrieves the identity provider for the given domain. A 200 response code indicates the domain is managed by a registered identity provider. A 404 indicates the domain is not managed.
1151 1152 1153 1154 1155 1156 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1151 def lookup_identity_provider(domain) start.uri('/api/identity-provider/lookup') .url_parameter('domain', domain) .get() .go() end |
#modify_action(action_id, request) ⇒ FusionAuth::ClientResponse
Modifies a temporal user action by changing the expiration of the action and optionally adding a comment to the action.
1165 1166 1167 1168 1169 1170 1171 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1165 def modify_action(action_id, request) start.uri('/api/user/action') .url_segment(action_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#passwordless_login(request) ⇒ FusionAuth::ClientResponse
Complete a login request using a passwordless code
1178 1179 1180 1181 1182 1183 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1178 def passwordless_login(request) startAnonymous.uri('/api/passwordless/login') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#patch_application(application_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the application with the given Id.
1191 1192 1193 1194 1195 1196 1197 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1191 def patch_application(application_id, request) start.uri('/api/application') .url_segment(application_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .patch() .go() end |
#patch_application_role(application_id, role_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the application role with the given id for the application.
1206 1207 1208 1209 1210 1211 1212 1213 1214 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1206 def patch_application_role(application_id, role_id, request) start.uri('/api/application') .url_segment(application_id) .url_segment("role") .url_segment(role_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .patch() .go() end |
#patch_connector(connector_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the connector with the given Id.
1222 1223 1224 1225 1226 1227 1228 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1222 def patch_connector(connector_id, request) start.uri('/api/connector') .url_segment(connector_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .patch() .go() end |
#patch_consent(consent_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the consent with the given Id.
1236 1237 1238 1239 1240 1241 1242 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1236 def (, request) start.uri('/api/consent') .url_segment() .body_handler(FusionAuth::JSONBodyHandler.new(request)) .patch() .go() end |
#patch_email_template(email_template_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the email template with the given Id.
1250 1251 1252 1253 1254 1255 1256 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1250 def patch_email_template(email_template_id, request) start.uri('/api/email/template') .url_segment(email_template_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .patch() .go() end |
#patch_group(group_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the group with the given Id.
1264 1265 1266 1267 1268 1269 1270 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1264 def patch_group(group_id, request) start.uri('/api/group') .url_segment(group_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .patch() .go() end |
#patch_identity_provider(identity_provider_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the identity provider with the given Id.
1278 1279 1280 1281 1282 1283 1284 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1278 def patch_identity_provider(identity_provider_id, request) start.uri('/api/identity-provider') .url_segment(identity_provider_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .patch() .go() end |
#patch_integrations(request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the available integrations.
1291 1292 1293 1294 1295 1296 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1291 def patch_integrations(request) start.uri('/api/integration') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .patch() .go() end |
#patch_lambda(lambda_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the lambda with the given Id.
1304 1305 1306 1307 1308 1309 1310 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1304 def patch_lambda(lambda_id, request) start.uri('/api/lambda') .url_segment(lambda_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .patch() .go() end |
#patch_registration(user_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the registration for the user with the given id and the application defined in the request.
1318 1319 1320 1321 1322 1323 1324 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1318 def patch_registration(user_id, request) start.uri('/api/user/registration') .url_segment(user_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .patch() .go() end |
#patch_system_configuration(request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the system configuration.
1331 1332 1333 1334 1335 1336 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1331 def patch_system_configuration(request) start.uri('/api/system-configuration') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .patch() .go() end |
#patch_tenant(tenant_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the tenant with the given Id.
1344 1345 1346 1347 1348 1349 1350 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1344 def patch_tenant(tenant_id, request) start.uri('/api/tenant') .url_segment(tenant_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .patch() .go() end |
#patch_theme(theme_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the theme with the given Id.
1358 1359 1360 1361 1362 1363 1364 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1358 def patch_theme(theme_id, request) start.uri('/api/theme') .url_segment(theme_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .patch() .go() end |
#patch_user(user_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the user with the given Id.
1372 1373 1374 1375 1376 1377 1378 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1372 def patch_user(user_id, request) start.uri('/api/user') .url_segment(user_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .patch() .go() end |
#patch_user_action(user_action_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the user action with the given Id.
1386 1387 1388 1389 1390 1391 1392 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1386 def patch_user_action(user_action_id, request) start.uri('/api/user-action') .url_segment(user_action_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .patch() .go() end |
#patch_user_action_reason(user_action_reason_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, the user action reason with the given Id.
1400 1401 1402 1403 1404 1405 1406 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1400 def patch_user_action_reason(user_action_reason_id, request) start.uri('/api/user-action-reason') .url_segment(user_action_reason_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .patch() .go() end |
#patch_user_consent(user_consent_id, request) ⇒ FusionAuth::ClientResponse
Updates, via PATCH, a single User consent by Id.
1414 1415 1416 1417 1418 1419 1420 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1414 def (, request) start.uri('/api/user/consent') .url_segment() .body_handler(FusionAuth::JSONBodyHandler.new(request)) .patch() .go() end |
#reactivate_application(application_id) ⇒ FusionAuth::ClientResponse
Reactivates the application with the given Id.
1427 1428 1429 1430 1431 1432 1433 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1427 def reactivate_application(application_id) start.uri('/api/application') .url_segment(application_id) .url_parameter('reactivate', true) .put() .go() end |
#reactivate_user(user_id) ⇒ FusionAuth::ClientResponse
Reactivates the user with the given Id.
1440 1441 1442 1443 1444 1445 1446 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1440 def reactivate_user(user_id) start.uri('/api/user') .url_segment(user_id) .url_parameter('reactivate', true) .put() .go() end |
#reactivate_user_action(user_action_id) ⇒ FusionAuth::ClientResponse
Reactivates the user action with the given Id.
1453 1454 1455 1456 1457 1458 1459 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1453 def reactivate_user_action(user_action_id) start.uri('/api/user-action') .url_segment(user_action_id) .url_parameter('reactivate', true) .put() .go() end |
#reconcile_jwt(request) ⇒ FusionAuth::ClientResponse
Reconcile a User to FusionAuth using JWT issued from another Identity Provider.
1466 1467 1468 1469 1470 1471 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1466 def reconcile_jwt(request) startAnonymous.uri('/api/jwt/reconcile') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#refresh_user_search_index ⇒ FusionAuth::ClientResponse
Request a refresh of the User search index. This API is not generally necessary and the search index will become consistent in a reasonable amount of time. There may be scenarios where you may wish to manually request an index refresh. One example may be if you are using the Search API or Delete Tenant API immediately following a User Create etc, you may wish to request a refresh to
ensure the index immediately current before making a query request to the search index.
1480 1481 1482 1483 1484 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1480 def refresh_user_search_index() start.uri('/api/user/search') .put() .go() end |
#register(user_id, request) ⇒ FusionAuth::ClientResponse
Registers a user for an application. If you provide the User and the UserRegistration object on this request, it will create the user as well as register them for the application. This is called a Full Registration. However, if you only provide the UserRegistration object, then the user must already exist and they will be registered for the application. The user id can also be provided and it will either be used to look up an existing user or it will be used for the newly created User.
1496 1497 1498 1499 1500 1501 1502 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1496 def register(user_id, request) start.uri('/api/user/registration') .url_segment(user_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#remove_user_from_family(family_id, user_id) ⇒ FusionAuth::ClientResponse
Removes a user from the family with the given id.
1510 1511 1512 1513 1514 1515 1516 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1510 def remove_user_from_family(family_id, user_id) start.uri('/api/user/family') .url_segment(family_id) .url_segment(user_id) .delete() .go() end |
#resend_email_verification(email) ⇒ FusionAuth::ClientResponse
Re-sends the verification email to the user.
1523 1524 1525 1526 1527 1528 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1523 def resend_email_verification(email) start.uri('/api/user/verify-email') .url_parameter('email', email) .put() .go() end |
#resend_email_verification_with_application_template(application_id, email) ⇒ FusionAuth::ClientResponse
Re-sends the verification email to the user. If the Application has configured a specific email template this will be used instead of the tenant configuration.
1537 1538 1539 1540 1541 1542 1543 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1537 def resend_email_verification_with_application_template(application_id, email) start.uri('/api/user/verify-email') .url_parameter('applicationId', application_id) .url_parameter('email', email) .put() .go() end |
#resend_registration_verification(email, application_id) ⇒ FusionAuth::ClientResponse
Re-sends the application registration verification email to the user.
1551 1552 1553 1554 1555 1556 1557 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1551 def resend_registration_verification(email, application_id) start.uri('/api/user/verify-registration') .url_parameter('email', email) .url_parameter('applicationId', application_id) .put() .go() end |
#retrieve_action(action_id) ⇒ FusionAuth::ClientResponse
Retrieves a single action log (the log of a user action that was taken on a user previously) for the given Id.
1564 1565 1566 1567 1568 1569 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1564 def retrieve_action(action_id) start.uri('/api/user/action') .url_segment(action_id) .get() .go() end |
#retrieve_actions(user_id) ⇒ FusionAuth::ClientResponse
Retrieves all of the actions for the user with the given Id. This will return all time based actions that are active, and inactive as well as non-time based actions.
1577 1578 1579 1580 1581 1582 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1577 def retrieve_actions(user_id) start.uri('/api/user/action') .url_parameter('userId', user_id) .get() .go() end |
#retrieve_actions_preventing_login(user_id) ⇒ FusionAuth::ClientResponse
Retrieves all of the actions for the user with the given Id that are currently preventing the User from logging in.
1589 1590 1591 1592 1593 1594 1595 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1589 def retrieve_actions_preventing_login(user_id) start.uri('/api/user/action') .url_parameter('userId', user_id) .url_parameter('preventingLogin', true) .get() .go() end |
#retrieve_active_actions(user_id) ⇒ FusionAuth::ClientResponse
Retrieves all of the actions for the user with the given Id that are currently active. An active action means one that is time based and has not been canceled, and has not ended.
1603 1604 1605 1606 1607 1608 1609 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1603 def retrieve_active_actions(user_id) start.uri('/api/user/action') .url_parameter('userId', user_id) .url_parameter('active', true) .get() .go() end |
#retrieve_application(application_id) ⇒ FusionAuth::ClientResponse
Retrieves the application for the given id or all of the applications if the id is null.
1616 1617 1618 1619 1620 1621 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1616 def retrieve_application(application_id) start.uri('/api/application') .url_segment(application_id) .get() .go() end |
#retrieve_applications ⇒ FusionAuth::ClientResponse
Retrieves all of the applications.
1627 1628 1629 1630 1631 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1627 def retrieve_applications() start.uri('/api/application') .get() .go() end |
#retrieve_audit_log(audit_log_id) ⇒ FusionAuth::ClientResponse
Retrieves a single audit log for the given Id.
1638 1639 1640 1641 1642 1643 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1638 def retrieve_audit_log(audit_log_id) start.uri('/api/system/audit-log') .url_segment(audit_log_id) .get() .go() end |
#retrieve_connector(connector_id) ⇒ FusionAuth::ClientResponse
Retrieves the connector with the given Id.
1650 1651 1652 1653 1654 1655 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1650 def retrieve_connector(connector_id) start.uri('/api/connector') .url_segment(connector_id) .get() .go() end |
#retrieve_connectors ⇒ FusionAuth::ClientResponse
Retrieves all of the connectors.
1661 1662 1663 1664 1665 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1661 def retrieve_connectors() start.uri('/api/connector') .get() .go() end |
#retrieve_consent(consent_id) ⇒ FusionAuth::ClientResponse
Retrieves the Consent for the given Id.
1672 1673 1674 1675 1676 1677 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1672 def () start.uri('/api/consent') .url_segment() .get() .go() end |
#retrieve_consents ⇒ FusionAuth::ClientResponse
Retrieves all of the consent.
1683 1684 1685 1686 1687 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1683 def () start.uri('/api/consent') .get() .go() end |
#retrieve_daily_active_report(application_id, start, _end) ⇒ FusionAuth::ClientResponse
Retrieves the daily active user report between the two instants. If you specify an application id, it will only return the daily active counts for that application.
1697 1698 1699 1700 1701 1702 1703 1704 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1697 def retrieve_daily_active_report(application_id, start, _end) start.uri('/api/report/daily-active-user') .url_parameter('applicationId', application_id) .url_parameter('start', start) .url_parameter('end', _end) .get() .go() end |
#retrieve_email_template(email_template_id) ⇒ FusionAuth::ClientResponse
Retrieves the email template for the given Id. If you don’t specify the id, this will return all of the email templates.
1711 1712 1713 1714 1715 1716 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1711 def retrieve_email_template(email_template_id) start.uri('/api/email/template') .url_segment(email_template_id) .get() .go() end |
#retrieve_email_template_preview(request) ⇒ FusionAuth::ClientResponse
Creates a preview of the email template provided in the request. This allows you to preview an email template that hasn’t been saved to the database yet. The entire email template does not need to be provided on the request. This will create the preview based on whatever is given.
1725 1726 1727 1728 1729 1730 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1725 def retrieve_email_template_preview(request) start.uri('/api/email/template/preview') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#retrieve_email_templates ⇒ FusionAuth::ClientResponse
Retrieves all of the email templates.
1736 1737 1738 1739 1740 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1736 def retrieve_email_templates() start.uri('/api/email/template') .get() .go() end |
#retrieve_event_log(event_log_id) ⇒ FusionAuth::ClientResponse
Retrieves a single event log for the given Id.
1747 1748 1749 1750 1751 1752 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1747 def retrieve_event_log(event_log_id) start.uri('/api/system/event-log') .url_segment(event_log_id) .get() .go() end |
#retrieve_families(user_id) ⇒ FusionAuth::ClientResponse
Retrieves all of the families that a user belongs to.
1759 1760 1761 1762 1763 1764 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1759 def retrieve_families(user_id) start.uri('/api/user/family') .url_parameter('userId', user_id) .get() .go() end |
#retrieve_family_members_by_family_id(family_id) ⇒ FusionAuth::ClientResponse
Retrieves all of the members of a family by the unique Family Id.
1771 1772 1773 1774 1775 1776 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1771 def retrieve_family_members_by_family_id(family_id) start.uri('/api/user/family') .url_segment(family_id) .get() .go() end |
#retrieve_form(form_id) ⇒ FusionAuth::ClientResponse
Retrieves the form with the given Id.
1783 1784 1785 1786 1787 1788 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1783 def retrieve_form(form_id) start.uri('/api/form') .url_segment(form_id) .get() .go() end |
#retrieve_form_field(field_id) ⇒ FusionAuth::ClientResponse
Retrieves the form field with the given Id.
1795 1796 1797 1798 1799 1800 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1795 def retrieve_form_field(field_id) start.uri('/api/form/field') .url_segment(field_id) .get() .go() end |
#retrieve_form_fields ⇒ FusionAuth::ClientResponse
Retrieves all of the forms fields
1806 1807 1808 1809 1810 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1806 def retrieve_form_fields() start.uri('/api/form/field') .get() .go() end |
#retrieve_forms ⇒ FusionAuth::ClientResponse
Retrieves all of the forms.
1816 1817 1818 1819 1820 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1816 def retrieve_forms() start.uri('/api/form') .get() .go() end |
#retrieve_group(group_id) ⇒ FusionAuth::ClientResponse
Retrieves the group for the given Id.
1827 1828 1829 1830 1831 1832 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1827 def retrieve_group(group_id) start.uri('/api/group') .url_segment(group_id) .get() .go() end |
#retrieve_groups ⇒ FusionAuth::ClientResponse
Retrieves all of the groups.
1838 1839 1840 1841 1842 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1838 def retrieve_groups() start.uri('/api/group') .get() .go() end |
#retrieve_identity_provider(identity_provider_id) ⇒ FusionAuth::ClientResponse
Retrieves the identity provider for the given id or all of the identity providers if the id is null.
1849 1850 1851 1852 1853 1854 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1849 def retrieve_identity_provider(identity_provider_id) start.uri('/api/identity-provider') .url_segment(identity_provider_id) .get() .go() end |
#retrieve_identity_provider_by_type(type) ⇒ FusionAuth::ClientResponse
Retrieves one or more identity provider for the given type. For types such as Google, Facebook, Twitter and LinkedIn, only a single identity provider can exist. For types such as OpenID Connect and SAMLv2 more than one identity provider can be configured so this request may return multiple identity providers.
1863 1864 1865 1866 1867 1868 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1863 def retrieve_identity_provider_by_type(type) start.uri('/api/identity-provider') .url_parameter('type', type) .get() .go() end |
#retrieve_identity_providers ⇒ FusionAuth::ClientResponse
Retrieves all of the identity providers.
1874 1875 1876 1877 1878 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1874 def retrieve_identity_providers() start.uri('/api/identity-provider') .get() .go() end |
#retrieve_inactive_actions(user_id) ⇒ FusionAuth::ClientResponse
Retrieves all of the actions for the user with the given Id that are currently inactive. An inactive action means one that is time based and has been canceled or has expired, or is not time based.
1886 1887 1888 1889 1890 1891 1892 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1886 def retrieve_inactive_actions(user_id) start.uri('/api/user/action') .url_parameter('userId', user_id) .url_parameter('active', false) .get() .go() end |
#retrieve_inactive_applications ⇒ FusionAuth::ClientResponse
Retrieves all of the applications that are currently inactive.
1898 1899 1900 1901 1902 1903 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1898 def retrieve_inactive_applications() start.uri('/api/application') .url_parameter('inactive', true) .get() .go() end |
#retrieve_inactive_user_actions ⇒ FusionAuth::ClientResponse
Retrieves all of the user actions that are currently inactive.
1909 1910 1911 1912 1913 1914 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1909 def retrieve_inactive_user_actions() start.uri('/api/user-action') .url_parameter('inactive', true) .get() .go() end |
#retrieve_integration ⇒ FusionAuth::ClientResponse
Retrieves the available integrations.
1920 1921 1922 1923 1924 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1920 def retrieve_integration() start.uri('/api/integration') .get() .go() end |
#retrieve_json_web_key_set ⇒ FusionAuth::ClientResponse
Returns public keys used by FusionAuth to cryptographically verify JWTs using the JSON Web Key format.
1964 1965 1966 1967 1968 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1964 def retrieve_json_web_key_set() startAnonymous.uri('/.well-known/jwks.json') .get() .go() end |
#retrieve_jwt_public_key(key_id) ⇒ FusionAuth::ClientResponse
Retrieves the Public Key configured for verifying JSON Web Tokens (JWT) by the key Id (kid).
1931 1932 1933 1934 1935 1936 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1931 def retrieve_jwt_public_key(key_id) startAnonymous.uri('/api/jwt/public-key') .url_parameter('kid', key_id) .get() .go() end |
#retrieve_jwt_public_key_by_application_id(application_id) ⇒ FusionAuth::ClientResponse
Retrieves the Public Key configured for verifying the JSON Web Tokens (JWT) issued by the Login API by the Application Id.
1943 1944 1945 1946 1947 1948 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1943 def retrieve_jwt_public_key_by_application_id(application_id) startAnonymous.uri('/api/jwt/public-key') .url_parameter('applicationId', application_id) .get() .go() end |
#retrieve_jwt_public_keys ⇒ FusionAuth::ClientResponse
Retrieves all Public Keys configured for verifying JSON Web Tokens (JWT).
1954 1955 1956 1957 1958 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1954 def retrieve_jwt_public_keys() startAnonymous.uri('/api/jwt/public-key') .get() .go() end |
#retrieve_key(key_id) ⇒ FusionAuth::ClientResponse
Retrieves the key for the given Id.
1975 1976 1977 1978 1979 1980 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1975 def retrieve_key(key_id) start.uri('/api/key') .url_segment(key_id) .get() .go() end |
#retrieve_keys ⇒ FusionAuth::ClientResponse
Retrieves all of the keys.
1986 1987 1988 1989 1990 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1986 def retrieve_keys() start.uri('/api/key') .get() .go() end |
#retrieve_lambda(lambda_id) ⇒ FusionAuth::ClientResponse
Retrieves the lambda for the given Id.
1997 1998 1999 2000 2001 2002 |
# File 'lib/fusionauth/fusionauth_client.rb', line 1997 def retrieve_lambda(lambda_id) start.uri('/api/lambda') .url_segment(lambda_id) .get() .go() end |
#retrieve_lambdas ⇒ FusionAuth::ClientResponse
Retrieves all of the lambdas.
2008 2009 2010 2011 2012 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2008 def retrieve_lambdas() start.uri('/api/lambda') .get() .go() end |
#retrieve_lambdas_by_type(type) ⇒ FusionAuth::ClientResponse
Retrieves all of the lambdas for the provided type.
2019 2020 2021 2022 2023 2024 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2019 def retrieve_lambdas_by_type(type) start.uri('/api/lambda') .url_parameter('type', type) .get() .go() end |
#retrieve_login_report(application_id, start, _end) ⇒ FusionAuth::ClientResponse
Retrieves the login report between the two instants. If you specify an application id, it will only return the login counts for that application.
2034 2035 2036 2037 2038 2039 2040 2041 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2034 def retrieve_login_report(application_id, start, _end) start.uri('/api/report/login') .url_parameter('applicationId', application_id) .url_parameter('start', start) .url_parameter('end', _end) .get() .go() end |
#retrieve_monthly_active_report(application_id, start, _end) ⇒ FusionAuth::ClientResponse
Retrieves the monthly active user report between the two instants. If you specify an application id, it will only return the monthly active counts for that application.
2051 2052 2053 2054 2055 2056 2057 2058 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2051 def retrieve_monthly_active_report(application_id, start, _end) start.uri('/api/report/monthly-active-user') .url_parameter('applicationId', application_id) .url_parameter('start', start) .url_parameter('end', _end) .get() .go() end |
#retrieve_oauth_configuration(application_id) ⇒ FusionAuth::ClientResponse
Retrieves the Oauth2 configuration for the application for the given Application Id.
2065 2066 2067 2068 2069 2070 2071 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2065 def retrieve_oauth_configuration(application_id) start.uri('/api/application') .url_segment(application_id) .url_segment("oauth-configuration") .get() .go() end |
#retrieve_open_id_configuration ⇒ FusionAuth::ClientResponse
Returns the well known OpenID Configuration JSON document
2077 2078 2079 2080 2081 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2077 def retrieve_open_id_configuration() startAnonymous.uri('/.well-known/openid-configuration') .get() .go() end |
#retrieve_password_validation_rules ⇒ FusionAuth::ClientResponse
Retrieves the password validation rules for a specific tenant. This method requires a tenantId to be provided through the use of a Tenant scoped API key or an HTTP header X-FusionAuth-TenantId to specify the Tenant Id.
This API does not require an API key.
2090 2091 2092 2093 2094 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2090 def retrieve_password_validation_rules() startAnonymous.uri('/api/tenant/password-validation-rules') .get() .go() end |
#retrieve_password_validation_rules_with_tenant_id(tenant_id) ⇒ FusionAuth::ClientResponse
Retrieves the password validation rules for a specific tenant.
This API does not require an API key.
2103 2104 2105 2106 2107 2108 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2103 def retrieve_password_validation_rules_with_tenant_id(tenant_id) startAnonymous.uri('/api/tenant/password-validation-rules') .url_segment(tenant_id) .get() .go() end |
#retrieve_pending_children(parent_email) ⇒ FusionAuth::ClientResponse
Retrieves all of the children for the given parent email address.
2115 2116 2117 2118 2119 2120 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2115 def retrieve_pending_children(parent_email) start.uri('/api/user/family/pending') .url_parameter('parentEmail', parent_email) .get() .go() end |
#retrieve_recent_logins(offset, limit) ⇒ FusionAuth::ClientResponse
Retrieves the last number of login records.
2128 2129 2130 2131 2132 2133 2134 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2128 def retrieve_recent_logins(offset, limit) start.uri('/api/user/recent-login') .url_parameter('offset', offset) .url_parameter('limit', limit) .get() .go() end |
#retrieve_refresh_token_by_id(user_id) ⇒ FusionAuth::ClientResponse
Retrieves a single refresh token by unique Id. This is not the same thing as the string value of the refresh token, if you have that, you already have what you need..
2141 2142 2143 2144 2145 2146 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2141 def retrieve_refresh_token_by_id(user_id) start.uri('/api/jwt/refresh') .url_segment(user_id) .get() .go() end |
#retrieve_refresh_tokens(user_id) ⇒ FusionAuth::ClientResponse
Retrieves the refresh tokens that belong to the user with the given Id.
2153 2154 2155 2156 2157 2158 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2153 def retrieve_refresh_tokens(user_id) start.uri('/api/jwt/refresh') .url_parameter('userId', user_id) .get() .go() end |
#retrieve_registration(user_id, application_id) ⇒ FusionAuth::ClientResponse
Retrieves the user registration for the user with the given id and the given application id.
2166 2167 2168 2169 2170 2171 2172 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2166 def retrieve_registration(user_id, application_id) start.uri('/api/user/registration') .url_segment(user_id) .url_segment(application_id) .get() .go() end |
#retrieve_registration_report(application_id, start, _end) ⇒ FusionAuth::ClientResponse
Retrieves the registration report between the two instants. If you specify an application id, it will only return the registration counts for that application.
2182 2183 2184 2185 2186 2187 2188 2189 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2182 def retrieve_registration_report(application_id, start, _end) start.uri('/api/report/registration') .url_parameter('applicationId', application_id) .url_parameter('start', start) .url_parameter('end', _end) .get() .go() end |
#retrieve_system_configuration ⇒ FusionAuth::ClientResponse
Retrieves the system configuration.
2195 2196 2197 2198 2199 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2195 def retrieve_system_configuration() start.uri('/api/system-configuration') .get() .go() end |
#retrieve_tenant(tenant_id) ⇒ FusionAuth::ClientResponse
Retrieves the tenant for the given Id.
2206 2207 2208 2209 2210 2211 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2206 def retrieve_tenant(tenant_id) start.uri('/api/tenant') .url_segment(tenant_id) .get() .go() end |
#retrieve_tenants ⇒ FusionAuth::ClientResponse
Retrieves all of the tenants.
2217 2218 2219 2220 2221 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2217 def retrieve_tenants() start.uri('/api/tenant') .get() .go() end |
#retrieve_theme(theme_id) ⇒ FusionAuth::ClientResponse
Retrieves the theme for the given Id.
2228 2229 2230 2231 2232 2233 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2228 def retrieve_theme(theme_id) start.uri('/api/theme') .url_segment(theme_id) .get() .go() end |
#retrieve_themes ⇒ FusionAuth::ClientResponse
Retrieves all of the themes.
2239 2240 2241 2242 2243 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2239 def retrieve_themes() start.uri('/api/theme') .get() .go() end |
#retrieve_total_report ⇒ FusionAuth::ClientResponse
Retrieves the totals report. This contains all of the total counts for each application and the global registration count.
2250 2251 2252 2253 2254 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2250 def retrieve_total_report() start.uri('/api/report/totals') .get() .go() end |
#retrieve_user(user_id) ⇒ FusionAuth::ClientResponse
Retrieves the user for the given Id.
2261 2262 2263 2264 2265 2266 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2261 def retrieve_user(user_id) start.uri('/api/user') .url_segment(user_id) .get() .go() end |
#retrieve_user_action(user_action_id) ⇒ FusionAuth::ClientResponse
Retrieves the user action for the given Id. If you pass in null for the id, this will return all of the user actions.
2274 2275 2276 2277 2278 2279 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2274 def retrieve_user_action(user_action_id) start.uri('/api/user-action') .url_segment(user_action_id) .get() .go() end |
#retrieve_user_action_reason(user_action_reason_id) ⇒ FusionAuth::ClientResponse
Retrieves the user action reason for the given Id. If you pass in null for the id, this will return all of the user action reasons.
2287 2288 2289 2290 2291 2292 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2287 def retrieve_user_action_reason(user_action_reason_id) start.uri('/api/user-action-reason') .url_segment(user_action_reason_id) .get() .go() end |
#retrieve_user_action_reasons ⇒ FusionAuth::ClientResponse
Retrieves all the user action reasons.
2298 2299 2300 2301 2302 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2298 def retrieve_user_action_reasons() start.uri('/api/user-action-reason') .get() .go() end |
#retrieve_user_actions ⇒ FusionAuth::ClientResponse
Retrieves all of the user actions.
2308 2309 2310 2311 2312 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2308 def retrieve_user_actions() start.uri('/api/user-action') .get() .go() end |
#retrieve_user_by_change_password_id(change_password_id) ⇒ FusionAuth::ClientResponse
Retrieves the user by a change password Id. The intended use of this API is to retrieve a user after the forgot password workflow has been initiated and you may not know the user’s email or username.
2320 2321 2322 2323 2324 2325 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2320 def retrieve_user_by_change_password_id(change_password_id) start.uri('/api/user') .url_parameter('changePasswordId', change_password_id) .get() .go() end |
#retrieve_user_by_email(email) ⇒ FusionAuth::ClientResponse
Retrieves the user for the given email.
2332 2333 2334 2335 2336 2337 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2332 def retrieve_user_by_email(email) start.uri('/api/user') .url_parameter('email', email) .get() .go() end |
#retrieve_user_by_login_id(login_id) ⇒ FusionAuth::ClientResponse
Retrieves the user for the loginId. The loginId can be either the username or the email.
2344 2345 2346 2347 2348 2349 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2344 def retrieve_user_by_login_id(login_id) start.uri('/api/user') .url_parameter('loginId', login_id) .get() .go() end |
#retrieve_user_by_username(username) ⇒ FusionAuth::ClientResponse
Retrieves the user for the given username.
2356 2357 2358 2359 2360 2361 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2356 def retrieve_user_by_username(username) start.uri('/api/user') .url_parameter('username', username) .get() .go() end |
#retrieve_user_by_verification_id(verification_id) ⇒ FusionAuth::ClientResponse
Retrieves the user by a verificationId. The intended use of this API is to retrieve a user after the forgot password workflow has been initiated and you may not know the user’s email or username.
2369 2370 2371 2372 2373 2374 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2369 def retrieve_user_by_verification_id(verification_id) start.uri('/api/user') .url_parameter('verificationId', verification_id) .get() .go() end |
#retrieve_user_comments(user_id) ⇒ FusionAuth::ClientResponse
Retrieves all of the comments for the user with the given Id.
2381 2382 2383 2384 2385 2386 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2381 def retrieve_user_comments(user_id) start.uri('/api/user/comment') .url_segment(user_id) .get() .go() end |
#retrieve_user_consent(user_consent_id) ⇒ FusionAuth::ClientResponse
Retrieve a single User consent by Id.
2393 2394 2395 2396 2397 2398 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2393 def () start.uri('/api/user/consent') .url_segment() .get() .go() end |
#retrieve_user_consents(user_id) ⇒ FusionAuth::ClientResponse
Retrieves all of the consents for a User.
2405 2406 2407 2408 2409 2410 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2405 def (user_id) start.uri('/api/user/consent') .url_parameter('userId', user_id) .get() .go() end |
#retrieve_user_info_from_access_token(encoded_jwt) ⇒ FusionAuth::ClientResponse
Call the UserInfo endpoint to retrieve User Claims from the access token issued by FusionAuth.
2417 2418 2419 2420 2421 2422 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2417 def retrieve_user_info_from_access_token(encoded_jwt) startAnonymous.uri('/oauth2/userinfo') .('Bearer ' + encoded_jwt) .get() .go() end |
#retrieve_user_login_report(application_id, user_id, start, _end) ⇒ FusionAuth::ClientResponse
Retrieves the login report between the two instants for a particular user by Id. If you specify an application id, it will only return the login counts for that application.
2433 2434 2435 2436 2437 2438 2439 2440 2441 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2433 def retrieve_user_login_report(application_id, user_id, start, _end) start.uri('/api/report/login') .url_parameter('applicationId', application_id) .url_parameter('userId', user_id) .url_parameter('start', start) .url_parameter('end', _end) .get() .go() end |
#retrieve_user_login_report_by_login_id(application_id, login_id, start, _end) ⇒ FusionAuth::ClientResponse
Retrieves the login report between the two instants for a particular user by login Id. If you specify an application id, it will only return the login counts for that application.
2452 2453 2454 2455 2456 2457 2458 2459 2460 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2452 def retrieve_user_login_report_by_login_id(application_id, login_id, start, _end) start.uri('/api/report/login') .url_parameter('applicationId', application_id) .url_parameter('loginId', login_id) .url_parameter('start', start) .url_parameter('end', _end) .get() .go() end |
#retrieve_user_recent_logins(user_id, offset, limit) ⇒ FusionAuth::ClientResponse
Retrieves the last number of login records for a user.
2469 2470 2471 2472 2473 2474 2475 2476 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2469 def retrieve_user_recent_logins(user_id, offset, limit) start.uri('/api/user/recent-login') .url_parameter('userId', user_id) .url_parameter('offset', offset) .url_parameter('limit', limit) .get() .go() end |
#retrieve_user_using_jwt(encoded_jwt) ⇒ FusionAuth::ClientResponse
Retrieves the user for the given Id. This method does not use an API key, instead it uses a JSON Web Token (JWT) for authentication.
2483 2484 2485 2486 2487 2488 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2483 def retrieve_user_using_jwt(encoded_jwt) startAnonymous.uri('/api/user') .('Bearer ' + encoded_jwt) .get() .go() end |
#retrieve_webhook(webhook_id) ⇒ FusionAuth::ClientResponse
Retrieves the webhook for the given Id. If you pass in null for the id, this will return all the webhooks.
2495 2496 2497 2498 2499 2500 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2495 def retrieve_webhook(webhook_id) start.uri('/api/webhook') .url_segment(webhook_id) .get() .go() end |
#retrieve_webhooks ⇒ FusionAuth::ClientResponse
Retrieves all the webhooks.
2506 2507 2508 2509 2510 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2506 def retrieve_webhooks() start.uri('/api/webhook') .get() .go() end |
#revoke_refresh_token(token, user_id, application_id) ⇒ FusionAuth::ClientResponse
Revokes refresh tokens.
Usage examples:
- Delete a single refresh token, pass in only the token.
revokeRefreshToken(token)
- Delete all refresh tokens for a user, pass in only the userId.
revokeRefreshToken(null, userId)
- Delete all refresh tokens for a user for a specific application, pass in both the userId and the applicationId.
revokeRefreshToken(null, userId, applicationId)
- Delete all refresh tokens for an application
revokeRefreshToken(null, null, applicationId)
Note: null
may be handled differently depending upon the programming language.
See also: (method names may vary by language… but you’ll figure it out)
- revokeRefreshTokenById
- revokeRefreshTokenByToken
- revokeRefreshTokensByUserId
- revokeRefreshTokensByApplicationId
- revokeRefreshTokensByUserIdForApplication
2542 2543 2544 2545 2546 2547 2548 2549 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2542 def revoke_refresh_token(token, user_id, application_id) start.uri('/api/jwt/refresh') .url_parameter('token', token) .url_parameter('userId', user_id) .url_parameter('applicationId', application_id) .delete() .go() end |
#revoke_refresh_token_by_id(token_id) ⇒ FusionAuth::ClientResponse
Revokes a single refresh token by the unique Id. The unique Id is not sensitive as it cannot be used to obtain another JWT.
2556 2557 2558 2559 2560 2561 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2556 def revoke_refresh_token_by_id(token_id) start.uri('/api/jwt/refresh') .url_segment(token_id) .delete() .go() end |
#revoke_refresh_token_by_token(token) ⇒ FusionAuth::ClientResponse
Revokes a single refresh token by using the actual refresh token value. This refresh token value is sensitive, so be careful with this API request.
2568 2569 2570 2571 2572 2573 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2568 def revoke_refresh_token_by_token(token) start.uri('/api/jwt/refresh') .url_parameter('token', token) .delete() .go() end |
#revoke_refresh_tokens_by_application_id(application_id) ⇒ FusionAuth::ClientResponse
Revoke all refresh tokens that belong to an application by applicationId.
2580 2581 2582 2583 2584 2585 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2580 def revoke_refresh_tokens_by_application_id(application_id) start.uri('/api/jwt/refresh') .url_parameter('applicationId', application_id) .delete() .go() end |
#revoke_refresh_tokens_by_user_id(user_id) ⇒ FusionAuth::ClientResponse
Revoke all refresh tokens that belong to a user by user Id.
2592 2593 2594 2595 2596 2597 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2592 def revoke_refresh_tokens_by_user_id(user_id) start.uri('/api/jwt/refresh') .url_parameter('userId', user_id) .delete() .go() end |
#revoke_refresh_tokens_by_user_id_for_application(user_id, application_id) ⇒ FusionAuth::ClientResponse
Revoke all refresh tokens that belong to a user by user Id for a specific application by applicationId.
2605 2606 2607 2608 2609 2610 2611 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2605 def revoke_refresh_tokens_by_user_id_for_application(user_id, application_id) start.uri('/api/jwt/refresh') .url_parameter('userId', user_id) .url_parameter('applicationId', application_id) .delete() .go() end |
#revoke_user_consent(user_consent_id) ⇒ FusionAuth::ClientResponse
Revokes a single User consent by Id.
2618 2619 2620 2621 2622 2623 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2618 def () start.uri('/api/user/consent') .url_segment() .delete() .go() end |
#search_audit_logs(request) ⇒ FusionAuth::ClientResponse
Searches the audit logs with the specified criteria and pagination.
2630 2631 2632 2633 2634 2635 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2630 def search_audit_logs(request) start.uri('/api/system/audit-log/search') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#search_event_logs(request) ⇒ FusionAuth::ClientResponse
Searches the event logs with the specified criteria and pagination.
2642 2643 2644 2645 2646 2647 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2642 def search_event_logs(request) start.uri('/api/system/event-log/search') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#search_login_records(request) ⇒ FusionAuth::ClientResponse
Searches the login records with the specified criteria and pagination.
2654 2655 2656 2657 2658 2659 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2654 def search_login_records(request) start.uri('/api/system/login-record/search') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#search_users(ids) ⇒ FusionAuth::ClientResponse
This method has been renamed to search_users_by_ids, use that method instead.
Retrieves the users for the given ids. If any id is invalid, it is ignored.
2667 2668 2669 2670 2671 2672 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2667 def search_users(ids) start.uri('/api/user/search') .url_parameter('ids', ids) .get() .go() end |
#search_users_by_ids(ids) ⇒ FusionAuth::ClientResponse
Retrieves the users for the given ids. If any id is invalid, it is ignored.
2679 2680 2681 2682 2683 2684 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2679 def search_users_by_ids(ids) start.uri('/api/user/search') .url_parameter('ids', ids) .get() .go() end |
#search_users_by_query(request) ⇒ FusionAuth::ClientResponse
Retrieves the users for the given search criteria and pagination.
2692 2693 2694 2695 2696 2697 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2692 def search_users_by_query(request) start.uri('/api/user/search') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#search_users_by_query_string(request) ⇒ FusionAuth::ClientResponse
This method has been renamed to search_users_by_query, use that method instead.
Retrieves the users for the given search criteria and pagination.
2706 2707 2708 2709 2710 2711 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2706 def search_users_by_query_string(request) start.uri('/api/user/search') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#send_email(email_template_id, request) ⇒ FusionAuth::ClientResponse
Send an email using an email template id. You can optionally provide requestData
to access key value pairs in the email template.
2720 2721 2722 2723 2724 2725 2726 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2720 def send_email(email_template_id, request) start.uri('/api/email/send') .url_segment(email_template_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#send_family_request_email(request) ⇒ FusionAuth::ClientResponse
Sends out an email to a parent that they need to register and create a family or need to log in and add a child to their existing family.
2733 2734 2735 2736 2737 2738 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2733 def send_family_request_email(request) start.uri('/api/user/family/request') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#send_passwordless_code(request) ⇒ FusionAuth::ClientResponse
Send a passwordless authentication code in an email to complete login.
2745 2746 2747 2748 2749 2750 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2745 def send_passwordless_code(request) startAnonymous.uri('/api/passwordless/send') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#send_two_factor_code(request) ⇒ FusionAuth::ClientResponse
Send a Two Factor authentication code to assist in setting up Two Factor authentication or disabling.
2757 2758 2759 2760 2761 2762 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2757 def send_two_factor_code(request) start.uri('/api/two-factor/send') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#send_two_factor_code_for_login(two_factor_id) ⇒ FusionAuth::ClientResponse
Send a Two Factor authentication code to allow the completion of Two Factor authentication.
2769 2770 2771 2772 2773 2774 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2769 def send_two_factor_code_for_login(two_factor_id) startAnonymous.uri('/api/two-factor/send') .url_segment(two_factor_id) .post() .go() end |
#set_tenant_id(tenant_id) ⇒ Object
40 41 42 |
# File 'lib/fusionauth/fusionauth_client.rb', line 40 def set_tenant_id(tenant_id) @tenant_id = tenant_id end |
#start_identity_provider_login(request) ⇒ FusionAuth::ClientResponse
Begins a login request for a 3rd party login that requires user interaction such as HYPR.
2782 2783 2784 2785 2786 2787 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2782 def start_identity_provider_login(request) start.uri('/api/identity-provider/start') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#start_passwordless_login(request) ⇒ FusionAuth::ClientResponse
Start a passwordless login request by generating a passwordless code. This code can be sent to the User using the Send Passwordless Code API or using a mechanism outside of FusionAuth. The passwordless login is completed by using the Passwordless Login API with this code.
2795 2796 2797 2798 2799 2800 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2795 def start_passwordless_login(request) start.uri('/api/passwordless/start') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#two_factor_login(request) ⇒ FusionAuth::ClientResponse
Complete login using a 2FA challenge
2807 2808 2809 2810 2811 2812 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2807 def two_factor_login(request) startAnonymous.uri('/api/two-factor/login') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() .go() end |
#update_application(application_id, request) ⇒ FusionAuth::ClientResponse
Updates the application with the given Id.
2820 2821 2822 2823 2824 2825 2826 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2820 def update_application(application_id, request) start.uri('/api/application') .url_segment(application_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#update_application_role(application_id, role_id, request) ⇒ FusionAuth::ClientResponse
Updates the application role with the given id for the application.
2835 2836 2837 2838 2839 2840 2841 2842 2843 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2835 def update_application_role(application_id, role_id, request) start.uri('/api/application') .url_segment(application_id) .url_segment("role") .url_segment(role_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#update_connector(connector_id, request) ⇒ FusionAuth::ClientResponse
Updates the connector with the given Id.
2851 2852 2853 2854 2855 2856 2857 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2851 def update_connector(connector_id, request) start.uri('/api/connector') .url_segment(connector_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#update_consent(consent_id, request) ⇒ FusionAuth::ClientResponse
Updates the consent with the given Id.
2865 2866 2867 2868 2869 2870 2871 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2865 def (, request) start.uri('/api/consent') .url_segment() .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#update_email_template(email_template_id, request) ⇒ FusionAuth::ClientResponse
Updates the email template with the given Id.
2879 2880 2881 2882 2883 2884 2885 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2879 def update_email_template(email_template_id, request) start.uri('/api/email/template') .url_segment(email_template_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#update_form(form_id, request) ⇒ FusionAuth::ClientResponse
Updates the form with the given Id.
2893 2894 2895 2896 2897 2898 2899 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2893 def update_form(form_id, request) start.uri('/api/form') .url_segment(form_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#update_form_field(field_id, request) ⇒ FusionAuth::ClientResponse
Updates the form field with the given Id.
2907 2908 2909 2910 2911 2912 2913 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2907 def update_form_field(field_id, request) start.uri('/api/form/field') .url_segment(field_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#update_group(group_id, request) ⇒ FusionAuth::ClientResponse
Updates the group with the given Id.
2921 2922 2923 2924 2925 2926 2927 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2921 def update_group(group_id, request) start.uri('/api/group') .url_segment(group_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#update_identity_provider(identity_provider_id, request) ⇒ FusionAuth::ClientResponse
Updates the identity provider with the given Id.
2935 2936 2937 2938 2939 2940 2941 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2935 def update_identity_provider(identity_provider_id, request) start.uri('/api/identity-provider') .url_segment(identity_provider_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#update_integrations(request) ⇒ FusionAuth::ClientResponse
Updates the available integrations.
2948 2949 2950 2951 2952 2953 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2948 def update_integrations(request) start.uri('/api/integration') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#update_key(key_id, request) ⇒ FusionAuth::ClientResponse
Updates the key with the given Id.
2961 2962 2963 2964 2965 2966 2967 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2961 def update_key(key_id, request) start.uri('/api/key') .url_segment(key_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#update_lambda(lambda_id, request) ⇒ FusionAuth::ClientResponse
Updates the lambda with the given Id.
2975 2976 2977 2978 2979 2980 2981 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2975 def update_lambda(lambda_id, request) start.uri('/api/lambda') .url_segment(lambda_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#update_registration(user_id, request) ⇒ FusionAuth::ClientResponse
Updates the registration for the user with the given id and the application defined in the request.
2989 2990 2991 2992 2993 2994 2995 |
# File 'lib/fusionauth/fusionauth_client.rb', line 2989 def update_registration(user_id, request) start.uri('/api/user/registration') .url_segment(user_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#update_system_configuration(request) ⇒ FusionAuth::ClientResponse
Updates the system configuration.
3002 3003 3004 3005 3006 3007 |
# File 'lib/fusionauth/fusionauth_client.rb', line 3002 def update_system_configuration(request) start.uri('/api/system-configuration') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#update_tenant(tenant_id, request) ⇒ FusionAuth::ClientResponse
Updates the tenant with the given Id.
3015 3016 3017 3018 3019 3020 3021 |
# File 'lib/fusionauth/fusionauth_client.rb', line 3015 def update_tenant(tenant_id, request) start.uri('/api/tenant') .url_segment(tenant_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#update_theme(theme_id, request) ⇒ FusionAuth::ClientResponse
Updates the theme with the given Id.
3029 3030 3031 3032 3033 3034 3035 |
# File 'lib/fusionauth/fusionauth_client.rb', line 3029 def update_theme(theme_id, request) start.uri('/api/theme') .url_segment(theme_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#update_user(user_id, request) ⇒ FusionAuth::ClientResponse
Updates the user with the given Id.
3043 3044 3045 3046 3047 3048 3049 |
# File 'lib/fusionauth/fusionauth_client.rb', line 3043 def update_user(user_id, request) start.uri('/api/user') .url_segment(user_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#update_user_action(user_action_id, request) ⇒ FusionAuth::ClientResponse
Updates the user action with the given Id.
3057 3058 3059 3060 3061 3062 3063 |
# File 'lib/fusionauth/fusionauth_client.rb', line 3057 def update_user_action(user_action_id, request) start.uri('/api/user-action') .url_segment(user_action_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#update_user_action_reason(user_action_reason_id, request) ⇒ FusionAuth::ClientResponse
Updates the user action reason with the given Id.
3071 3072 3073 3074 3075 3076 3077 |
# File 'lib/fusionauth/fusionauth_client.rb', line 3071 def update_user_action_reason(user_action_reason_id, request) start.uri('/api/user-action-reason') .url_segment(user_action_reason_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#update_user_consent(user_consent_id, request) ⇒ FusionAuth::ClientResponse
Updates a single User consent by Id.
3085 3086 3087 3088 3089 3090 3091 |
# File 'lib/fusionauth/fusionauth_client.rb', line 3085 def (, request) start.uri('/api/user/consent') .url_segment() .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#update_webhook(webhook_id, request) ⇒ FusionAuth::ClientResponse
Updates the webhook with the given Id.
3099 3100 3101 3102 3103 3104 3105 |
# File 'lib/fusionauth/fusionauth_client.rb', line 3099 def update_webhook(webhook_id, request) start.uri('/api/webhook') .url_segment(webhook_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() .go() end |
#validate_device(user_code, client_id) ⇒ FusionAuth::ClientResponse
Validates the end-user provided user_code from the user-interaction of the Device Authorization Grant. If you build your own activation form you should validate the user provided code prior to beginning the Authorization grant.
3114 3115 3116 3117 3118 3119 3120 |
# File 'lib/fusionauth/fusionauth_client.rb', line 3114 def validate_device(user_code, client_id) startAnonymous.uri('/oauth2/device/validate') .url_parameter('user_code', user_code) .url_parameter('client_id', client_id) .get() .go() end |
#validate_jwt(encoded_jwt) ⇒ FusionAuth::ClientResponse
Validates the provided JWT (encoded JWT string) to ensure the token is valid. A valid access token is properly signed and not expired. <p> This API may be used to verify the JWT as well as decode the encoded JWT into human readable identity claims.
3130 3131 3132 3133 3134 3135 |
# File 'lib/fusionauth/fusionauth_client.rb', line 3130 def validate_jwt(encoded_jwt) startAnonymous.uri('/api/jwt/validate') .('Bearer ' + encoded_jwt) .get() .go() end |
#verify_email(verification_id) ⇒ FusionAuth::ClientResponse
Confirms a email verification. The Id given is usually from an email sent to the user.
3142 3143 3144 3145 3146 3147 |
# File 'lib/fusionauth/fusionauth_client.rb', line 3142 def verify_email(verification_id) startAnonymous.uri('/api/user/verify-email') .url_segment(verification_id) .post() .go() end |
#verify_registration(verification_id) ⇒ FusionAuth::ClientResponse
Confirms an application registration. The Id given is usually from an email sent to the user.
3154 3155 3156 3157 3158 3159 |
# File 'lib/fusionauth/fusionauth_client.rb', line 3154 def verify_registration(verification_id) startAnonymous.uri('/api/user/verify-registration') .url_segment(verification_id) .post() .go() end |