mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-21 07:36:43 +00:00
✨(backend) accept form-urlencoded on the user token endpoint
Accept `application/x-www-form-urlencoded` requests on the user token endpoint, in addition to the existing JSON support. This aligns the endpoint with the OAuth 2.0 specification for token endpoint requests (RFC 6749, sections 3.2 and 4.4.2), so standard OAuth 2.0 client libraries can call it without any customization, while keeping backward compatibility with existing JSON clients.
This commit is contained in:
committed by
aleb_the_flash
parent
a82023f8b0
commit
d005f202c6
@@ -12,6 +12,9 @@ from rest_framework import decorators, mixins, viewsets
|
||||
from rest_framework import (
|
||||
exceptions as drf_exceptions,
|
||||
)
|
||||
from rest_framework import (
|
||||
parsers as drf_parsers,
|
||||
)
|
||||
from rest_framework import (
|
||||
response as drf_response,
|
||||
)
|
||||
@@ -41,6 +44,7 @@ class ApplicationViewSet(viewsets.ViewSet):
|
||||
methods=["post"],
|
||||
url_path="token",
|
||||
url_name="token",
|
||||
parser_classes=[drf_parsers.FormParser, drf_parsers.JSONParser],
|
||||
)
|
||||
@FeatureFlag.require("application")
|
||||
def generate_jwt_access_token(self, request, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user