Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When private is set to true, mercure returns unathorized #38

Closed
ArensMyzyri opened this issue Feb 20, 2021 · 2 comments
Closed

When private is set to true, mercure returns unathorized #38

ArensMyzyri opened this issue Feb 20, 2021 · 2 comments

Comments

@ArensMyzyri
Copy link

Any idea why mercure returns 401 when publisher field private is set to true?
image

With false works just fine.

@azjezz
Copy link
Contributor

azjezz commented Mar 9, 2021

Hello @ArensMyzyri

This problem is probably because you didn't see the topic name in your JWT token.

assuming $topic->getTopicName() returns foo, your JWT token content should look something like {"mercure": {"publish": ["foo"]}}

If you wish to be able to publish to all topics, you can set "publish" list to ["*"].

you can read more about mercure authorization here: https://symfony.com/doc/current/mercure.html#authorization

can you please confirm that this is the case?

@chalasr
Copy link
Member

chalasr commented Oct 13, 2021

Closing due to the lack of feedback.

@chalasr chalasr closed this as completed Oct 13, 2021
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

No branches or pull requests

3 participants