You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.
Is your feature request related to a specific problem?
oauth_util.py should have a get_current_user function
A description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
fromfastapiimportDepends, Securityfromfastapi.securityimportSecurityScopesfromsqlalchemy.ormimportSessionfromfideslib.oauth.api.depsimportget_dbfromfideslib.models.fides_userimportFidesUserasyncdefget_current_user(
security_scopes: SecurityScopes,
authorization: str=Security(oauth2_scheme),
db: Session=Depends(get_db),
) ->FidesUser:
"""A wrapper around verify_oauth_client that returns that client's user if one exsits."""client=awaitverify_oauth_client(
security_scopes=security_scopes,
authorization=authorization,
db=db,
)
returnclient.user
Describe alternatives you've considered, if any
Let each library implement their own version.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a specific problem?
oauth_util.py
should have aget_current_user
functionA description of what the problem is.
Ex. I'm always frustrated when [...]
Describe the solution you'd like
Describe alternatives you've considered, if any
Let each library implement their own version.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: