Skip to content

New User Auth #441

Answered by ma-gu-16
ma-gu-16 asked this question in Q&A
Sep 7, 2021 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

I used your suggestion but i resolved it on a bit different way.

In My SecureTopicHandler

<?php

class SecureTopicHandler
{
    public function secure(?ConnectionInterface $conn, Topic $topic, WampRequest $request, $payload = null, ?array $exclude = [], ?array $eligible = null, ?string $provider = null): void
    {
        /** @var $serverRequest \GuzzleHttp\Psr7\Request  */
        $serverRequest = $conn->__get('httpRequest');

        // check if user authorized
        $user = $this->clientManipulator->getUser($conn);
        if(!$user instanceof User){
            // if not check if its a server internal request.
            if($serverRequest->hasHeader('xxxxToken') && $this->container->

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@ma-gu-16
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by ma-gu-16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #440 on September 07, 2021 15:36.