Skip to content

add PSR15/PSR-17 compliant middleware - #1029

Open
datapp wants to merge 9 commits into
thephpleague:masterfrom
datapp:feature/psr15-middleware-support
Open

add PSR15/PSR-17 compliant middleware#1029
datapp wants to merge 9 commits into
thephpleague:masterfrom
datapp:feature/psr15-middleware-support

Conversation

@datapp

@datapp datapp commented Jul 8, 2019

Copy link
Copy Markdown
Contributor

resolves issue #942

@Sephster

Copy link
Copy Markdown
Member

Apologies for the delay on looking at this @datapp. I'm planning on merging this in later today although I will likely move the middleware into its own PSR folder instead of including PSR in the name. Many thanks for your efforts with this!

@carpabg

carpabg commented Jan 6, 2020

Copy link
Copy Markdown

This branch has not been merged yet. Could you merge it please @Sephster ?

@Sephster

Sephster commented Jan 6, 2020

Copy link
Copy Markdown
Member

Sorry I completely forgot about this. I'm focusing on the Device Auth Grant at the moment but will pick this up as soon as I can.

@delboy1978uk

Copy link
Copy Markdown

bump :-)

@interface-master

Copy link
Copy Markdown

bump, please - this looks good 👍

@jg-development

Copy link
Copy Markdown

any updates on this?

@eugene-borovov eugene-borovov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Authorization Server Middleware doesn`t work :-(

public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
try {
$response = $this->server->respondToAccessTokenRequest($request, $this->responseFactory->createResponse());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should return the response here

}

// Pass the request on to the next responder in the chain
return $handler->handle($request);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This statement is unreachable.

$requestHandlerMock
);

$this->assertEquals(200, $response->getStatusCode());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add tests for the body of the response. Now it is empty.

@xerc

xerc commented Nov 22, 2024

Copy link
Copy Markdown
Contributor

@Sephster any change you may (correct if and) merge this these days?

@delboy1978uk

Copy link
Copy Markdown

The auth server middleware actually makes no sense, you should only have your auth and access token end points, where else would we want that?
And I ended up just making my own resource server middleware (4 years ago :-P ), because then I could fetch my user too and attach it to the request. So I'm no longer sure if his PR is actually all that necessary.

@xerc

xerc commented Nov 25, 2024

Copy link
Copy Markdown
Contributor

@delboy1978uk would just be nice to include PSR15 standart to integrate easier (expl. with slim 4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants