Skip to content

Commit

Permalink
Confirm user registration as admin without needing a confirmation code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ezra Bowden committed Nov 12, 2017
1 parent 33df03c commit ee681e1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions warrant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,21 @@ def register(self, username, password, attr_map=None, **kwargs):
response.pop('ResponseMetadata')
return response

def admin_confirm_sign_up(self, username=None):
"""
Confirms user registration as an admin without using a confirmation
code. Works on any user.
:param confirmation_code: Confirmation code sent via text or email
:param username: User's username
:return:
"""
if not username:
username = self.username
self.client.admin_confirm_sign_up(
UserPoolId=self.user_pool_id,
Username=username,
)

def confirm_sign_up(self,confirmation_code,username=None):
"""
Using the confirmation code that is either sent via email or text
Expand Down

0 comments on commit ee681e1

Please sign in to comment.