Skip to content

Conversation

@t3ran13
Copy link

@t3ran13 t3ran13 commented Feb 27, 2017

Possibility to add own handshake middleware for ws server
For example, I made handshake with OAuth access token)

ServerPushHandlerRegistry $serverPushHandlerRegistry,
LoggerInterface $logger = null
LoggerInterface $logger = null,
HandshakeMiddlewareRegistry $handshakeMiddlewareRegistry

Choose a reason for hiding this comment

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

Arguments with default values must be at the end of the argument list

@jjsaunier
Copy link
Contributor

Hey,

Thank your for your contribution, could you open a PR on https://github.com/GeniusesOfSymfony/WebsocketAppDemo and target your branch via composer

gos/web-socket-bundle: '1.8.6 as dev-staging-handcheck-middleware'

And add a sample handshake middleware then I can run integration against it.

@t3ran13
Copy link
Author

t3ran13 commented Mar 2, 2017

while I made the fix for the constructor and added middleware example to docs (HandshakeMiddleware.md)

@jjsaunier
Copy link
Contributor

Staging branch staging-handcheck-middleware updated 👍

@t3ran13
Copy link
Author

t3ran13 commented Mar 2, 2017

@jjsaunier
Copy link
Contributor

Got this after composer install :

image

@t3ran13
Copy link
Author

t3ran13 commented Mar 16, 2017

Sorry, l will look to it in a few days


$user = $accessToken->getUser();
$token = new AnonymousToken(
$request->getQuery()->get('access_token'),
Copy link
Contributor

Choose a reason for hiding this comment

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

what if the request object is null? and what if the access token is given in header?


/**
* @param HandshakeMiddlewareAbstract $middleware
* @throws \Exception
Copy link
Contributor

Choose a reason for hiding this comment

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

where?

@t3ran13
Copy link
Author

t3ran13 commented Mar 22, 2017

@Prophet777
updated, delete composer.lock

@pierre-tranchard
it is just example
annotation was fixed

@t3ran13
Copy link
Author

t3ran13 commented Apr 3, 2017

@Prophet777
some news?

@jjsaunier
Copy link
Contributor

Yes sorry, I don't have time, I'll try to test this week end, i'm sorry :/

@t3ran13
Copy link
Author

t3ran13 commented May 1, 2017

@Prophet777 ping

@mbabker mbabker closed this Aug 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants