lib/fusionauth/fusionauth_client.rb in fusionauth_client-1.45.0 vs lib/fusionauth/fusionauth_client.rb in fusionauth_client-1.46.0

- old
+ new

@@ -43,11 +43,11 @@ # # 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. # - # @param request [OpenStruct, Hash] The action request that includes all of the information about the action being taken including + # @param request [OpenStruct, Hash] The action request that includes all the information about the action being taken including # the id of the action, any options and the duration (if applicable). # @return [FusionAuth::ClientResponse] The ClientResponse object. def action_user(request) start.uri('/api/user/action') .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -80,10 +80,31 @@ .put() .go() end # + # Approve a device grant. + # + # @param client_id [string] (Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you are attempting to authenticate. + # @param client_secret [string] (Optional) The client secret. This value will be required if client authentication is enabled. + # @param token [string] The access token used to identify the user. + # @param user_code [string] The end-user verification code. + # @return [FusionAuth::ClientResponse] The ClientResponse object. + def approve_device(client_id, client_secret, token, user_code) + body = { + "client_id" => client_id, + "client_secret" => client_secret, + "token" => token, + "user_code" => user_code + } + start.uri('/oauth2/device/approve') + .body_handler(FusionAuth::FormDataBodyHandler.new(body)) + .post() + .go() + end + + # # Cancels the user action. # # @param action_id [string] The action id of the action to cancel. # @param request [OpenStruct, Hash] The action request that contains the information about the cancellation. # @return [FusionAuth::ClientResponse] The ClientResponse object. @@ -101,11 +122,11 @@ # # As of version 1.32.2, prefer sending the changePasswordId in the request body. To do this, omit the first parameter, and set # the value in the request body. # # @param change_password_id [string] The change password Id used to find the user. This value is generated by FusionAuth once the change password workflow has been initiated. - # @param request [OpenStruct, Hash] The change password request that contains all of the information used to change the password. + # @param request [OpenStruct, Hash] The change password request that contains all the information used to change the password. # @return [FusionAuth::ClientResponse] The ClientResponse object. def change_password(change_password_id, request) startAnonymous.uri('/api/user/change-password') .url_segment(change_password_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -116,11 +137,11 @@ # # 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. # - # @param request [OpenStruct, Hash] The change password request that contains all of the information used to change the password. + # @param request [OpenStruct, Hash] The change password request that contains all the information used to change the password. # @return [FusionAuth::ClientResponse] The ClientResponse object. def change_password_by_identity(request) start.uri('/api/user/change-password') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() @@ -176,12 +197,14 @@ end # # Make a Client Credentials grant request to obtain an access token. # - # @param client_id [string] The client identifier. The client Id is the Id of the FusionAuth Entity in which you are attempting to authenticate. - # @param client_secret [string] The client secret used to authenticate this request. + # @param client_id [string] (Optional) The client identifier. The client Id is the Id of the FusionAuth Entity in which you are attempting to authenticate. + # This parameter is optional when Basic Authorization is used to authenticate this request. + # @param client_secret [string] (Optional) The client secret used to authenticate this request. + # This parameter is optional when Basic Authorization is used to authenticate this request. # @param scope [string] (Optional) This parameter is used to indicate which target entity you are requesting access. To request access to an entity, use the format target-entity:&lt;target-entity-id&gt;:&lt;roles&gt;. Roles are an optional comma separated list. # @return [FusionAuth::ClientResponse] The ClientResponse object. def client_credentials_grant(client_id, client_secret, scope) body = { "client_id" => client_id, @@ -249,11 +272,11 @@ # to that API key. # # If an API key is locked to a tenant, it can only create API Keys for that same tenant. # # @param key_id [string] (Optional) The unique Id of the API key. If not provided a secure random Id will be generated. - # @param request [OpenStruct, Hash] The request object that contains all of the information needed to create the APIKey. + # @param request [OpenStruct, Hash] The request object that contains all the information needed to create the APIKey. # @return [FusionAuth::ClientResponse] The ClientResponse object. def create_api_key(key_id, request) start.uri('/api/api-key') .url_segment(key_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -895,11 +918,11 @@ end # # Removes users as members of a group. # - # @param request [OpenStruct, Hash] The member request that contains all of the information used to remove members to the group. + # @param request [OpenStruct, Hash] The member request that contains all the information used to remove members to the group. # @return [FusionAuth::ClientResponse] The ClientResponse object. def delete_group_members(request) start.uri('/api/group/member') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .delete() @@ -1237,11 +1260,12 @@ # # 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. # # @param code [string] The authorization code returned on the /oauth2/authorize response. - # @param client_id [string] The unique client identifier. The client Id is the Id of the FusionAuth Application in which you are attempting to authenticate. + # @param client_id [string] (Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you are attempting to authenticate. + # This parameter is optional when Basic Authorization is used to authenticate this request. # @param client_secret [string] (Optional) The client secret. This value will be required if client authentication is enabled. # @param redirect_uri [string] The URI to redirect to upon a successful request. # @return [FusionAuth::ClientResponse] The ClientResponse object. def exchange_o_auth_code_for_access_token(code, client_id, client_secret, redirect_uri) body = { @@ -1261,10 +1285,11 @@ # 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. # # @param code [string] The authorization code returned on the /oauth2/authorize response. # @param client_id [string] (Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you are attempting to authenticate. This parameter is optional when the Authorization header is provided. + # This parameter is optional when Basic Authorization is used to authenticate this request. # @param client_secret [string] (Optional) The client secret. This value may optionally be provided in the request body instead of the Authorization header. # @param redirect_uri [string] The URI to redirect to upon a successful request. # @param code_verifier [string] The random string generated previously. Will be compared with the code_challenge sent previously, which allows the OAuth provider to authenticate your app. # @return [FusionAuth::ClientResponse] The ClientResponse object. def exchange_o_auth_code_for_access_token_using_pkce(code, client_id, client_secret, redirect_uri, code_verifier) @@ -1286,10 +1311,11 @@ # 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. # # @param refresh_token [string] The refresh token that you would like to use to exchange for an access token. # @param client_id [string] (Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you are attempting to authenticate. This parameter is optional when the Authorization header is provided. + # This parameter is optional when Basic Authorization is used to authenticate this request. # @param client_secret [string] (Optional) The client secret. This value may optionally be provided in the request body instead of the Authorization header. # @param scope [string] (Optional) This parameter is optional and if omitted, the same scope requested during the authorization request will be used. If provided the scopes must match those requested during the initial authorization request. # @param user_code [string] (Optional) The end-user verification code. This code is required if using this endpoint to approve the Device Authorization. # @return [FusionAuth::ClientResponse] The ClientResponse object. def exchange_refresh_token_for_access_token(refresh_token, client_id, client_secret, scope, user_code) @@ -1324,10 +1350,11 @@ # 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. # # @param username [string] The login identifier of the user. The login identifier can be either the email or the username. # @param password [string] The user’s password. # @param client_id [string] (Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you are attempting to authenticate. This parameter is optional when the Authorization header is provided. + # This parameter is optional when Basic Authorization is used to authenticate this request. # @param client_secret [string] (Optional) The client secret. This value may optionally be provided in the request body instead of the Authorization header. # @param scope [string] (Optional) This parameter is optional and if omitted, the same scope requested during the authorization request will be used. If provided the scopes must match those requested during the initial authorization request. # @param user_code [string] (Optional) The end-user verification code. This code is required if using this endpoint to approve the Device Authorization. # @return [FusionAuth::ClientResponse] The ClientResponse object. def exchange_user_credentials_for_access_token(username, password, client_id, client_secret, scope, user_code) @@ -1476,11 +1503,11 @@ # 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. # - # @param request [OpenStruct, Hash] The request that contains all of the information about all of the refresh tokens to import. + # @param request [OpenStruct, Hash] The request that contains all the information about all the refresh tokens to import. # @return [FusionAuth::ClientResponse] The ClientResponse object. def import_refresh_tokens(request) start.uri('/api/user/refresh-token/import') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() @@ -1495,11 +1522,11 @@ # 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. # - # @param request [OpenStruct, Hash] The request that contains all of the information about all of the users to import. + # @param request [OpenStruct, Hash] The request that contains all the information about all the users to import. # @return [FusionAuth::ClientResponse] The ClientResponse object. def import_users(request) start.uri('/api/user/import') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() @@ -1517,14 +1544,14 @@ .post() .go() end # - # Inspect an access token issued by FusionAuth. + # Inspect an access token issued as the result of the User based grant such as the Authorization Code Grant, Implicit Grant, the User Credentials Grant or the Refresh Grant. # # @param client_id [string] The unique client identifier. The client Id is the Id of the FusionAuth Application for which this token was generated. - # @param token [string] The access token returned by this OAuth provider as the result of a successful authentication. + # @param token [string] The access token returned by this OAuth provider as the result of a successful client credentials grant. # @return [FusionAuth::ClientResponse] The ClientResponse object. def introspect_access_token(client_id, token) body = { "client_id" => client_id, "token" => token @@ -1534,10 +1561,25 @@ .post() .go() end # + # Inspect an access token issued as the result of the Client Credentials Grant. + # + # @param token [string] The access token returned by this OAuth provider as the result of a successful client credentials grant. + # @return [FusionAuth::ClientResponse] The ClientResponse object. + def introspect_client_credentials_access_token(token) + body = { + "token" => token + } + startAnonymous.uri('/oauth2/introspect') + .body_handler(FusionAuth::FormDataBodyHandler.new(body)) + .post() + .go() + end + + # # 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. @@ -1609,11 +1651,11 @@ # # 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. # - # @param global [Boolean] When this value is set to true all of the refresh tokens issued to the owner of the + # @param global [Boolean] When this value is set to true all the refresh tokens issued to the owner of the # provided token will be revoked. # @param refresh_token [string] (Optional) The refresh_token as a request parameter instead of coming in via a cookie. # If provided this takes precedence over the cookie. # @return [FusionAuth::ClientResponse] The ClientResponse object. def logout(global, refresh_token) @@ -1653,11 +1695,11 @@ # # Modifies a temporal user action by changing the expiration of the action and optionally adding a comment to the # action. # # @param action_id [string] The Id of the action to modify. This is technically the user action log id. - # @param request [OpenStruct, Hash] The request that contains all of the information about the modification. + # @param request [OpenStruct, Hash] The request that contains all the information about the modification. # @return [FusionAuth::ClientResponse] The ClientResponse object. def modify_action(action_id, request) start.uri('/api/user/action') .url_segment(action_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -1666,11 +1708,11 @@ end # # Complete a login request using a passwordless code # - # @param request [OpenStruct, Hash] The passwordless login request that contains all of the information used to complete login. + # @param request [OpenStruct, Hash] The passwordless login request that contains all the information used to complete login. # @return [FusionAuth::ClientResponse] The ClientResponse object. def passwordless_login(request) startAnonymous.uri('/api/passwordless/login') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() @@ -1679,11 +1721,11 @@ # # Updates an authentication API key by given id # # @param key_id [string] The Id of the authentication key. If not provided a secure random api key will be generated. - # @param request [OpenStruct, Hash] The request object that contains all of the information needed to create the APIKey. + # @param request [OpenStruct, Hash] The request object that contains all the information needed to create the APIKey. # @return [FusionAuth::ClientResponse] The ClientResponse object. def patch_api_key(key_id, request) start.uri('/api/api-key') .url_segment(key_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -2209,11 +2251,11 @@ .get() .go() end # - # Retrieves the application for the given id or all of the applications if the id is null. + # Retrieves the application for the given id or all the applications if the id is null. # # @param application_id [string] (Optional) The application id. # @return [FusionAuth::ClientResponse] The ClientResponse object. def retrieve_application(application_id) start.uri('/api/application') @@ -2304,11 +2346,11 @@ .get() .go() end # - # Retrieves the email template for the given Id. If you don't specify the id, this will return all of the email templates. + # Retrieves the email template for the given Id. If you don't specify the id, this will return all the email templates. # # @param email_template_id [string] (Optional) The Id of the email template. # @return [FusionAuth::ClientResponse] The ClientResponse object. def retrieve_email_template(email_template_id) start.uri('/api/email/template') @@ -2505,11 +2547,11 @@ .get() .go() end # - # Retrieves the identity provider for the given id or all of the identity providers if the id is null. + # Retrieves the identity provider for the given id or all the identity providers if the id is null. # # @param identity_provider_id [string] The identity provider Id. # @return [FusionAuth::ClientResponse] The ClientResponse object. def retrieve_identity_provider(identity_provider_id) start.uri('/api/identity-provider') @@ -2704,11 +2746,11 @@ .get() .go() end # - # Retrieves the message template for the given Id. If you don't specify the id, this will return all of the message templates. + # Retrieves the message template for the given Id. If you don't specify the id, this will return all the message templates. # # @param message_template_id [string] (Optional) The Id of the message template. # @return [FusionAuth::ClientResponse] The ClientResponse object. def retrieve_message_template(message_template_id) start.uri('/api/message/template') @@ -2839,10 +2881,24 @@ .get() .go() end # + # Retrieve a pending identity provider link. This is useful to validate a pending link and retrieve meta-data about the identity provider link. + # + # @param p_ending_link_id [string] The pending link Id. + # @param user_id [string] The optional userId. When provided additional meta-data will be provided to identify how many links if any the user already has. + # @return [FusionAuth::ClientResponse] The ClientResponse object. + def retrieve_pending_link(pending_link_id, user_id) + start.uri('/api/identity-provider/link/pending') + .url_segment(pending_link_id) + .url_parameter('userId', user_id) + .get() + .go() + end + + # # Retrieves the FusionAuth Reactor metrics. # # @return [FusionAuth::ClientResponse] The ClientResponse object. def retrieve_reactor_metrics() start.uri('/api/reactor/metrics') @@ -2993,11 +3049,11 @@ .get() .go() end # - # Retrieves the totals report. This contains all of the total counts for each application and the global registration + # Retrieves the totals report. This contains all the total counts for each application and the global registration # count. # # @return [FusionAuth::ClientResponse] The ClientResponse object. def retrieve_total_report() start.uri('/api/report/totals') @@ -3047,11 +3103,11 @@ .get() .go() end # - # Retrieves the user action for the given Id. If you pass in null for the id, this will return all of the user + # Retrieves the user action for the given Id. If you pass in null for the id, this will return all the user # actions. # # @param user_action_id [string] (Optional) The Id of the user action. # @return [FusionAuth::ClientResponse] The ClientResponse object. def retrieve_user_action(user_action_id) @@ -3060,11 +3116,11 @@ .get() .go() end # - # Retrieves the user action reason for the given Id. If you pass in null for the id, this will return all of the user + # Retrieves the user action reason for the given Id. If you pass in null for the id, this will return all the user # action reasons. # # @param user_action_reason_id [string] (Optional) The Id of the user action reason. # @return [FusionAuth::ClientResponse] The ClientResponse object. def retrieve_user_action_reason(user_action_reason_id) @@ -3155,10 +3211,50 @@ .get() .go() end # + # Retrieve a user_code that is part of an in-progress Device Authorization Grant. + # + # This API is useful if you want to build your own login workflow to complete a device grant. + # + # @param client_id [string] The client id. + # @param client_secret [string] The client id. + # @param user_code [string] The end-user verification code. + # @return [FusionAuth::ClientResponse] The ClientResponse object. + def retrieve_user_code(client_id, client_secret, user_code) + body = { + "client_id" => client_id, + "client_secret" => client_secret, + "user_code" => user_code + } + startAnonymous.uri('/oauth2/device/user-code') + .body_handler(FusionAuth::FormDataBodyHandler.new(body)) + .get() + .go() + end + + # + # Retrieve a user_code that is part of an in-progress Device Authorization Grant. + # + # This API is useful if you want to build your own login workflow to complete a device grant. + # + # This request will require an API key. + # + # @param user_code [string] The end-user verification code. + # @return [FusionAuth::ClientResponse] The ClientResponse object. + def retrieve_user_code_using_api_key(user_code) + body = { + "user_code" => user_code + } + startAnonymous.uri('/oauth2/device/user-code') + .body_handler(FusionAuth::FormDataBodyHandler.new(body)) + .get() + .go() + end + + # # Retrieves all the comments for the user with the given Id. # # @param user_id [string] The Id of the user. # @return [FusionAuth::ClientResponse] The ClientResponse object. def retrieve_user_comments(user_id) @@ -3777,11 +3873,11 @@ # # Send an email using an email template id. You can optionally provide <code>requestData</code> to access key value # pairs in the email template. # # @param email_template_id [string] The id for the template. - # @param request [OpenStruct, Hash] The send email request that contains all of the information used to send the email. + # @param request [OpenStruct, Hash] The send email request that contains all the information used to send the email. # @return [FusionAuth::ClientResponse] The ClientResponse object. def send_email(email_template_id, request) start.uri('/api/email/send') .url_segment(email_template_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -3802,11 +3898,11 @@ end # # Send a passwordless authentication code in an email to complete login. # - # @param request [OpenStruct, Hash] The passwordless send request that contains all of the information used to send an email containing a code. + # @param request [OpenStruct, Hash] The passwordless send request that contains all the information used to send an email containing a code. # @return [FusionAuth::ClientResponse] The ClientResponse object. def send_passwordless_code(request) startAnonymous.uri('/api/passwordless/send') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() @@ -3853,11 +3949,11 @@ # # Send a Two Factor authentication code to allow the completion of Two Factor authentication. # # @param two_factor_id [string] The Id returned by the Login API necessary to complete Two Factor authentication. - # @param request [OpenStruct, Hash] The Two Factor send request that contains all of the information used to send the Two Factor code to the user. + # @param request [OpenStruct, Hash] The Two Factor send request that contains all the information used to send the Two Factor code to the user. # @return [FusionAuth::ClientResponse] The ClientResponse object. def send_two_factor_code_for_login_using_method(two_factor_id, request) startAnonymous.uri('/api/two-factor/send') .url_segment(two_factor_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -3880,11 +3976,11 @@ # # 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. # - # @param request [OpenStruct, Hash] The passwordless start request that contains all of the information used to begin the passwordless login request. + # @param request [OpenStruct, Hash] The passwordless start request that contains all the information used to begin the passwordless login request. # @return [FusionAuth::ClientResponse] The ClientResponse object. def start_passwordless_login(request) start.uri('/api/passwordless/start') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() @@ -3895,13 +3991,13 @@ # Start a Two-Factor login request by generating a two-factor identifier. This code can then be sent to the Two Factor Send # API (/api/two-factor/send)in order to send a one-time use code to a user. You can also use one-time use code returned # to send the code out-of-band. The Two-Factor login is completed by making a request to the Two-Factor Login # API (/api/two-factor/login). with the two-factor identifier and the one-time use code. # - # This API is intended to allow you to begin a Two-Factor login outside of a normal login that originated from the Login API (/api/login). + # This API is intended to allow you to begin a Two-Factor login outside a normal login that originated from the Login API (/api/login). # - # @param request [OpenStruct, Hash] The Two-Factor start request that contains all of the information used to begin the Two-Factor login request. + # @param request [OpenStruct, Hash] The Two-Factor start request that contains all the information used to begin the Two-Factor login request. # @return [FusionAuth::ClientResponse] The ClientResponse object. def start_two_factor_login(request) start.uri('/api/two-factor/start') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post() @@ -3960,11 +4056,11 @@ # # Updates the application with the given Id. # # @param application_id [string] The Id of the application to update. - # @param request [OpenStruct, Hash] The request that contains all of the new application information. + # @param request [OpenStruct, Hash] The request that contains all the new application information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_application(application_id, request) start.uri('/api/application') .url_segment(application_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -3975,11 +4071,11 @@ # # Updates the application role with the given id for the application. # # @param application_id [string] The Id of the application that the role belongs to. # @param role_id [string] The Id of the role to update. - # @param request [OpenStruct, Hash] The request that contains all of the new role information. + # @param request [OpenStruct, Hash] The request that contains all the new role information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_application_role(application_id, role_id, request) start.uri('/api/application') .url_segment(application_id) .url_segment("role") @@ -3991,11 +4087,11 @@ # # Updates the connector with the given Id. # # @param connector_id [string] The Id of the connector to update. - # @param request [OpenStruct, Hash] The request object that contains all of the new connector information. + # @param request [OpenStruct, Hash] The request object that contains all the new connector information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_connector(connector_id, request) start.uri('/api/connector') .url_segment(connector_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -4005,11 +4101,11 @@ # # Updates the consent with the given Id. # # @param consent_id [string] The Id of the consent to update. - # @param request [OpenStruct, Hash] The request that contains all of the new consent information. + # @param request [OpenStruct, Hash] The request that contains all the new consent information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_consent(consent_id, request) start.uri('/api/consent') .url_segment(consent_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -4019,11 +4115,11 @@ # # Updates the email template with the given Id. # # @param email_template_id [string] The Id of the email template to update. - # @param request [OpenStruct, Hash] The request that contains all of the new email template information. + # @param request [OpenStruct, Hash] The request that contains all the new email template information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_email_template(email_template_id, request) start.uri('/api/email/template') .url_segment(email_template_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -4033,11 +4129,11 @@ # # Updates the Entity with the given Id. # # @param entity_id [string] The Id of the Entity to update. - # @param request [OpenStruct, Hash] The request that contains all of the new Entity information. + # @param request [OpenStruct, Hash] The request that contains all the new Entity information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_entity(entity_id, request) start.uri('/api/entity') .url_segment(entity_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -4047,11 +4143,11 @@ # # Updates the Entity Type with the given Id. # # @param entity_type_id [string] The Id of the Entity Type to update. - # @param request [OpenStruct, Hash] The request that contains all of the new Entity Type information. + # @param request [OpenStruct, Hash] The request that contains all the new Entity Type information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_entity_type(entity_type_id, request) start.uri('/api/entity/type') .url_segment(entity_type_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -4062,11 +4158,11 @@ # # Updates the permission with the given id for the entity type. # # @param entity_type_id [string] The Id of the entityType that the permission belongs to. # @param permission_id [string] The Id of the permission to update. - # @param request [OpenStruct, Hash] The request that contains all of the new permission information. + # @param request [OpenStruct, Hash] The request that contains all the new permission information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_entity_type_permission(entity_type_id, permission_id, request) start.uri('/api/entity/type') .url_segment(entity_type_id) .url_segment("permission") @@ -4078,11 +4174,11 @@ # # Updates the form with the given Id. # # @param form_id [string] The Id of the form to update. - # @param request [OpenStruct, Hash] The request object that contains all of the new form information. + # @param request [OpenStruct, Hash] The request object that contains all the new form information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_form(form_id, request) start.uri('/api/form') .url_segment(form_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -4092,11 +4188,11 @@ # # Updates the form field with the given Id. # # @param field_id [string] The Id of the form field to update. - # @param request [OpenStruct, Hash] The request object that contains all of the new form field information. + # @param request [OpenStruct, Hash] The request object that contains all the new form field information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_form_field(field_id, request) start.uri('/api/form/field') .url_segment(field_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -4106,11 +4202,11 @@ # # Updates the group with the given Id. # # @param group_id [string] The Id of the group to update. - # @param request [OpenStruct, Hash] The request that contains all of the new group information. + # @param request [OpenStruct, Hash] The request that contains all the new group information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_group(group_id, request) start.uri('/api/group') .url_segment(group_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -4132,11 +4228,11 @@ # # Updates the IP Access Control List with the given Id. # # @param access_control_list_id [string] The Id of the IP Access Control List to update. - # @param request [OpenStruct, Hash] The request that contains all of the new IP Access Control List information. + # @param request [OpenStruct, Hash] The request that contains all the new IP Access Control List information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_ip_access_control_list(access_control_list_id, request) start.uri('/api/ip-acl') .url_segment(access_control_list_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -4159,11 +4255,11 @@ end # # Updates the available integrations. # - # @param request [OpenStruct, Hash] The request that contains all of the new integration information. + # @param request [OpenStruct, Hash] The request that contains all the new integration information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_integrations(request) start.uri('/api/integration') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() @@ -4172,11 +4268,11 @@ # # Updates the key with the given Id. # # @param key_id [string] The Id of the key to update. - # @param request [OpenStruct, Hash] The request that contains all of the new key information. + # @param request [OpenStruct, Hash] The request that contains all the new key information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_key(key_id, request) start.uri('/api/key') .url_segment(key_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -4186,11 +4282,11 @@ # # Updates the lambda with the given Id. # # @param lambda_id [string] The Id of the lambda to update. - # @param request [OpenStruct, Hash] The request that contains all of the new lambda information. + # @param request [OpenStruct, Hash] The request that contains all the new lambda information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_lambda(lambda_id, request) start.uri('/api/lambda') .url_segment(lambda_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -4200,11 +4296,11 @@ # # Updates the message template with the given Id. # # @param message_template_id [string] The Id of the message template to update. - # @param request [OpenStruct, Hash] The request that contains all of the new message template information. + # @param request [OpenStruct, Hash] The request that contains all the new message template information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_message_template(message_template_id, request) start.uri('/api/message/template') .url_segment(message_template_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -4214,11 +4310,11 @@ # # Updates the messenger with the given Id. # # @param messenger_id [string] The Id of the messenger to update. - # @param request [OpenStruct, Hash] The request object that contains all of the new messenger information. + # @param request [OpenStruct, Hash] The request object that contains all the new messenger information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_messenger(messenger_id, request) start.uri('/api/messenger') .url_segment(messenger_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -4228,11 +4324,11 @@ # # Updates the registration for the user with the given id and the application defined in the request. # # @param user_id [string] The Id of the user whose registration is going to be updated. - # @param request [OpenStruct, Hash] The request that contains all of the new registration information. + # @param request [OpenStruct, Hash] The request that contains all the new registration information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_registration(user_id, request) start.uri('/api/user/registration') .url_segment(user_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -4241,11 +4337,11 @@ end # # Updates the system configuration. # - # @param request [OpenStruct, Hash] The request that contains all of the new system configuration information. + # @param request [OpenStruct, Hash] The request that contains all the new system configuration information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_system_configuration(request) start.uri('/api/system-configuration') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .put() @@ -4254,11 +4350,11 @@ # # Updates the tenant with the given Id. # # @param tenant_id [string] The Id of the tenant to update. - # @param request [OpenStruct, Hash] The request that contains all of the new tenant information. + # @param request [OpenStruct, Hash] The request that contains all the new tenant information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_tenant(tenant_id, request) start.uri('/api/tenant') .url_segment(tenant_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -4268,11 +4364,11 @@ # # Updates the theme with the given Id. # # @param theme_id [string] The Id of the theme to update. - # @param request [OpenStruct, Hash] The request that contains all of the new theme information. + # @param request [OpenStruct, Hash] The request that contains all the new theme information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_theme(theme_id, request) start.uri('/api/theme') .url_segment(theme_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -4282,11 +4378,11 @@ # # Updates the user with the given Id. # # @param user_id [string] The Id of the user to update. - # @param request [OpenStruct, Hash] The request that contains all of the new user information. + # @param request [OpenStruct, Hash] The request that contains all the new user information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_user(user_id, request) start.uri('/api/user') .url_segment(user_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -4296,11 +4392,11 @@ # # Updates the user action with the given Id. # # @param user_action_id [string] The Id of the user action to update. - # @param request [OpenStruct, Hash] The request that contains all of the new user action information. + # @param request [OpenStruct, Hash] The request that contains all the new user action information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_user_action(user_action_id, request) start.uri('/api/user-action') .url_segment(user_action_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -4310,11 +4406,11 @@ # # Updates the user action reason with the given Id. # # @param user_action_reason_id [string] The Id of the user action reason to update. - # @param request [OpenStruct, Hash] The request that contains all of the new user action reason information. + # @param request [OpenStruct, Hash] The request that contains all the new user action reason information. # @return [FusionAuth::ClientResponse] The ClientResponse object. 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)) @@ -4338,11 +4434,11 @@ # # Updates the webhook with the given Id. # # @param webhook_id [string] The Id of the webhook to update. - # @param request [OpenStruct, Hash] The request that contains all of the new webhook information. + # @param request [OpenStruct, Hash] The request that contains all the new webhook information. # @return [FusionAuth::ClientResponse] The ClientResponse object. def update_webhook(webhook_id, request) start.uri('/api/webhook') .url_segment(webhook_id) .body_handler(FusionAuth::JSONBodyHandler.new(request)) @@ -4404,10 +4500,10 @@ # The iat, exp and jti claims will be added by FusionAuth, all other claims must be provided by the caller. # # If a TTL is not provided in the request, the TTL will be retrieved from the default Tenant or the Tenant specified on the request either # by way of the X-FusionAuth-TenantId request header, or a tenant scoped API key. # - # @param request [OpenStruct, Hash] The request that contains all of the claims for this JWT. + # @param request [OpenStruct, Hash] The request that contains all the claims for this JWT. # @return [FusionAuth::ClientResponse] The ClientResponse object. def vend_jwt(request) start.uri('/api/jwt/vend') .body_handler(FusionAuth::JSONBodyHandler.new(request)) .post()