lib/fusionauth/fusionauth_client.rb in fusionauth_client-1.41.0 vs lib/fusionauth/fusionauth_client.rb in fusionauth_client-1.42.0
- old
+ new
@@ -1189,15 +1189,15 @@
.delete()
.go()
end
#
- # Disable Two Factor authentication for a user.
+ # Disable two-factor authentication for a user.
#
- # @param user_id [string] The Id of the User for which you're disabling Two Factor authentication.
+ # @param user_id [string] The Id of the User for which you're disabling two-factor authentication.
# @param method_id [string] The two-factor method identifier you wish to disable
- # @param code [string] The Two Factor code used verify the the caller knows the Two Factor secret.
+ # @param code [string] The two-factor code used verify the the caller knows the two-factor secret.
# @return [FusionAuth::ClientResponse] The ClientResponse object.
def disable_two_factor(user_id, method_id, code)
start.uri('/api/user/two-factor')
.url_segment(user_id)
.url_parameter('methodId', method_id)
@@ -1205,13 +1205,13 @@
.delete()
.go()
end
#
- # Disable Two Factor authentication for a user using a JSON body rather than URL parameters.
+ # Disable two-factor authentication for a user using a JSON body rather than URL parameters.
#
- # @param user_id [string] The Id of the User for which you're disabling Two Factor authentication.
+ # @param user_id [string] The Id of the User for which you're disabling two-factor authentication.
# @param request [OpenStruct, Hash] The request information that contains the code and methodId along with any event information.
# @return [FusionAuth::ClientResponse] The ClientResponse object.
def disable_two_factor_with_request(user_id, request)
start.uri('/api/user/two-factor')
.url_segment(user_id)
@@ -1219,14 +1219,14 @@
.delete()
.go()
end
#
- # Enable Two Factor authentication for a user.
+ # Enable two-factor authentication for a user.
#
- # @param user_id [string] The Id of the user to enable Two Factor authentication.
- # @param request [OpenStruct, Hash] The two factor enable request information.
+ # @param user_id [string] The Id of the user to enable two-factor authentication.
+ # @param request [OpenStruct, Hash] The two-factor enable request information.
# @return [FusionAuth::ClientResponse] The ClientResponse object.
def enable_two_factor(user_id, request)
start.uri('/api/user/two-factor')
.url_segment(user_id)
.body_handler(FusionAuth::JSONBodyHandler.new(request))
@@ -1237,11 +1237,11 @@
#
# 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 you are attempting to authenticate.
+ # @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_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 = {
@@ -1260,11 +1260,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 you are attempting to authenticate. This parameter is optional when the Authorization header is provided.
+ # @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.
# @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)
@@ -1285,11 +1285,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 you are attempting to authenticate. This parameter is optional when the Authorization header is provided.
+ # @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.
# @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)
@@ -1323,10 +1323,10 @@
# 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.
#
# @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 you are attempting to authenticate. This parameter is optional when the Authorization header is provided.
+ # @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.
# @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)