Skip to content

Separate Authorization Request Validation and Response #101

@imgurbot12

Description

@imgurbot12

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 response

Looking at the existing fastapi example it does not seem
like a solution or workaround exists otherwise.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions