Title: | A Simplified Interface for 'Amazon Cognito' |
---|---|
Description: | Simplifies integration with 'Amazon Cognito' (<https://aws.amazon.com/cognito/>) for R developers, enabling easy management of user authentication, registration, and password flows. |
Authors: | Sanjaya J Shetty [aut, cre] |
Maintainer: | Sanjaya J Shetty <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2024-12-14 06:54:02 UTC |
Source: | CRAN |
Change User Password
change_password(old_password, new_password, token)
change_password(old_password, new_password, token)
old_password |
A character string representing the user's current password. |
new_password |
A character string representing the user's new password. |
token |
A character string representing the user's access token. |
A message indicating the success of the password change, or an error if it fails.
This function confirms the forgot password process by setting a new password for a user.
confirm_forgot_password(client_id, username, confirmation_code, new_password)
confirm_forgot_password(client_id, username, confirmation_code, new_password)
client_id |
A character string representing the app client ID. |
username |
A character string for the user's username. |
confirmation_code |
A character string for the confirmation code sent to the user. |
new_password |
A character string for the user's new password. |
Nothing (displays a message on success or raises an error if it fails).
This function confirms the sign-up process for a user in AWS Cognito.
confirm_sign_up_user(client_id, userpool, username, verification_code)
confirm_sign_up_user(client_id, userpool, username, verification_code)
client_id |
A character string representing the app client ID. |
userpool |
A character string representing the user pool ID. |
username |
A character string for the user's username. |
verification_code |
A character string for the verification code sent to the user. |
Nothing (displays a message on success or raises an error if it fails).
Initiate Forgot Password Request
forgot_password(client_id, username)
forgot_password(client_id, username)
client_id |
A character string representing the app client ID. |
username |
A character string for the user's username. |
Nothing (displays a message on success or raises an error if it fails).
Retrieve the list of usernames and email addresses from Cognito.
get_user_list_from_cognito(cognito_client, userpool)
get_user_list_from_cognito(cognito_client, userpool)
cognito_client |
The Cognito client. |
userpool |
A character string representing the user pool ID. |
A list containing usernames and email addresses.
This function validates the format of an email address.
is_valid_email(email)
is_valid_email(email)
email |
The email address to be validated. |
TRUE if the email is valid, otherwise an error is thrown.
This function validates the format of an access token.
is_valid_token(token)
is_valid_token(token)
token |
The access token to be validated. |
TRUE if the token is valid, otherwise an error is thrown.
Sign in to AWS Cognito
sign_in(client_id, username, password, authflow = "USER_PASSWORD_AUTH")
sign_in(client_id, username, password, authflow = "USER_PASSWORD_AUTH")
client_id |
A character string representing the app client ID. |
username |
A character string for the user's username. |
password |
A character string for the user's password. |
authflow |
A character string specifying the authentication flow (default: "USER_PASSWORD_AUTH"). |
A list with user information and tokens if successful; throws an error otherwise.
Sign up a new user to AWS Cognito
sign_up_user(client_id, email, username, password, ...)
sign_up_user(client_id, email, username, password, ...)
client_id |
A character string representing the app client ID. |
email |
A character string for the user's email address. |
username |
A character string for the user's username. |
password |
A character string for the user's password. |
... |
Additional named user attributes for Cognito (e.g., 'phone_number'). |
A list with sign-up confirmation details if successful; throws an error otherwise.