[Documentation] How to access user attributes
See original GitHub issueThis crucial part is missing in the documentation. based on: https://github.com/Intility/fastapi-azure-auth/pull/8#issuecomment-899034836
Here a stub that could help:
You can access the authorized user’s attributes with request.state.user
A sample view that outputs the current user name:
from fastapi import Request, Security
@app.get("/hello", dependencies=[Security(azure_scheme)])
async def hello(request: Request):
return "Hello {}".format(request.state.user.name)
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Attributes - User.com Documentation
For the start, you can filter your users using various attributes in the data base. Click on the filter icon to see all...
Read more >User Attributes | Holistics Docs
To view and manage User Attributes of a User, visit the User Management page, and then select Attributes in the actions panel of...
Read more >User attributes | Looker - Google Cloud
User attributes provide a customized experience for each Looker user. A Looker admin defines a user attribute and then applies a user attribute...
Read more >User.Attributes | Apple Developer Documentation
Attributes that describe a Users resource. ... Assigned user roles that determine the user's access to sections of App Store Connect and tasks...
Read more >Creating user attribute documents with the API - IBM
First, determine the user's ID by running a GET request in the users endpoint in the API. This example assumes that the user...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
😊 Also added a bunch of new pages if you’d like to check them out under the same section, such as how to use Graph and how to call your APIs from Python 🎉
Thank you, @JonasKs I m sure it will help people getting on board.