question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Documentation] How to access user attributes

See original GitHub issue

This 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:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
JonasKscommented, Apr 4, 2022

😊 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 🎉

0reactions
martin-greentraxcommented, Apr 4, 2022

Thank you, @JonasKs I m sure it will help people getting on board.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found