thephpleague / oauth2-server-bundle

Symfony bundle for the OAuth2 Server.
MIT License
176 stars 86 forks source link

Request getContent() #182

Closed akeebismail closed 4 months ago

akeebismail commented 4 months ago

Hi, I am currently use league 8.3 and have an endpoint that only take username and password then in the controller, I intercept the request to add some parameters to the symfony request for the league AuthorizationServer

[ 'grant_type' => 'password',
    'client_id' => 'client-id',
    'client_secret' => 'secret',
     'scopes' => '',
]

now in the new upgrade, I can't pass this again in the request as it doesn't get to the AuthorizationServerwhen it it can symfonyRequest->getContent(), league want to pass it through the request but my application is currently running prod. How do I implement this. current running code

$request->request->add([
        'grant_type' => 'password',
          'client_id' => 'client-id',
          'client_secret' => 'secret',
            'scopes' => '',
        ]);

        $psrRequest = $this->convertToPsr7Request($request);

when calling the endpoint like, it works

 POST localhost/oauth/token  {username: 'username', password: 'password'}

but now, in the new upgrade I can't pass the parameters as it not getting to symfonyRequest->getContent(), is there away I can override request to include those parameters without sending from the application client to support backward compactibility? thanks.