-
-
Notifications
You must be signed in to change notification settings - Fork 197
Added miscellaneous category to documentation #1358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,10 @@ DynamoDB | |
|
||
examples/dynamo_db/insertions | ||
examples/dynamo_db/tables | ||
|
||
Cognito Identity Provider | ||
-------- | ||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
examples/cognito_idp/forgot_password.rst | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To maintain the convention used for other links, please remove the |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Cognito Identity Provider | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The heading should be descriptive of the example - to play nicely with the table of contents. In this case: |
||
------------------- | ||
|
||
Amazon Cognito Identity Provider (IdP) allows you to manage user authentication and user management for your applications. | ||
|
||
We will demonstrate usage with the Cognito forgot password feature. | ||
|
||
.. note:: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The note does not add much value and may be removed. |
||
This example shows how to use the Cognito forgot password feature. | ||
|
||
.. literalinclude:: ../../../examples/cognito_idp_forgot_password.py |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Boto should get credentials from ~/.aws/credentials or the environment | ||
import asyncio | ||
|
||
from aiobotocore.session import get_session | ||
|
||
|
||
async def go(): | ||
session = get_session() | ||
async with session.create_client( | ||
'cognito-idp', | ||
region_name='us-west-2', | ||
) as client: | ||
# initiate forgot password | ||
resp = await client.forgot_password( | ||
ClientId='xxx', | ||
Username='xxx', | ||
) | ||
print(resp) | ||
|
||
# confirm forgot password | ||
resp = await client.confirm_forgot_password( | ||
ClientId='xxx', | ||
Username='xxx', | ||
ConfirmationCode='xxx', | ||
Password='xxx', | ||
) | ||
print(resp) | ||
|
||
|
||
if __name__ == '__main__': | ||
asyncio.run(go()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve readability, the dashes should repeat for the entire width of the heading.