From 0c3db4b1618f69e8105dc8fb4745d7bb2957717b Mon Sep 17 00:00:00 2001 From: Karl Ritchie Date: Thu, 24 Oct 2019 21:42:35 -0400 Subject: [PATCH 1/2] Add reset password admin --- warrant/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/warrant/__init__.py b/warrant/__init__.py index 2a0c2313..3141648c 100644 --- a/warrant/__init__.py +++ b/warrant/__init__.py @@ -589,6 +589,13 @@ def admin_delete_user(self): Username=self.username ) + def admin_reset_password(self, client_metadata=None): + response = self.client.admin_reset_user_password( + UserPoolId=self.user_pool_id, + Username=self.username, + ClientMetatada=client_metadata, + ) + def confirm_forgot_password(self, confirmation_code, password): """ Allows a user to enter a code provided when they reset their password From a788fd47a4dac787acad7ac3320a3e866a960097 Mon Sep 17 00:00:00 2001 From: Karl Ritchie Date: Thu, 24 Oct 2019 21:44:24 -0400 Subject: [PATCH 2/2] Use variable instead of class member --- warrant/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/warrant/__init__.py b/warrant/__init__.py index 3141648c..67b22932 100644 --- a/warrant/__init__.py +++ b/warrant/__init__.py @@ -589,10 +589,10 @@ def admin_delete_user(self): Username=self.username ) - def admin_reset_password(self, client_metadata=None): + def admin_reset_password(self, username, client_metadata=None): response = self.client.admin_reset_user_password( UserPoolId=self.user_pool_id, - Username=self.username, + Username=username, ClientMetatada=client_metadata, )