-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Is your feature request related to a problem? Please describe.
Currently, it seems it is not possible to validate an authorization request separately from generating an authorization response.
This means that a user must be redirected to a login and be logged in before the initial authorization request processing can be made. Otherwise the request fails due to missing user information
This is very problematic because it means only after the user has properly logged in does the oauth-server report an error with the criteria passed ahead of time to the server making the login virtually pointless.
Describe the solution you'd like
It would be very beneficial to have some sort of workflow like this:
def authorize(request):
server = AuthorizationServer(storage=storage)
state = server.validate_authorization_request(request)
redirect('/login')
def post_login(request, state):
server = AuthorizationServer(storage=storage)
response = server.create_authorization_response(state)
return responseLooking at the existing fastapi example it does not seem
like a solution or workaround exists otherwise.