oauth2-server-php icon indicating copy to clipboard operation
oauth2-server-php copied to clipboard

Integration with Psr\Http\Message\ RequestInterface and ResponseInterface

Open matteovisotto opened this issue 2 years ago • 1 comments

Hi, I'm trying to integrate the library with a website written using Slim where requests and responses are of type Psr\Http\Message. Searching I didn't found anything for supporting that, there is a way to create a Mapper between the two objects?

Thanks

matteovisotto avatar Jan 23 '23 17:01 matteovisotto

There is a laminas-api-tools/api-tools-oauth2 package, which overrides the auth controller and uses its own request and response objects. It intercepts the response objects from this packages and transforms it into a laminas http response. This could be a possible way how you could implement PSR-7 with slim.

ezkimo avatar Feb 06 '23 16:02 ezkimo