2

I'm working with mercure to get real time response.

i configured mercure with docker :

mercure:
    container_name: mercure
    image: dunglas/mercure
    restart: always
    environment:
      PUBLISHER_JWT_KEY: mySecretKeyPublisher
      SUBSCRIBER_JWT_KEY: mySecretKeySubscriber
      ALLOW_ANONYMOUS: 1
      CORS_ALLOWED_ORIGINS: "*"
    networks:
      - proxy

my dev url to test mercure is :

http://mercure.localhost/.well-known/mercure

I generated token using https://jwt.io/

I used this payload :

{
    "mercure": {
        "publish": ["*"]
    }
}

and mySecretKeyPublisher :

enter image description here

Now i test with postman :

enter image description here enter image description here enter image description here

I got always : Unauthorized

Khaled Boussoffara
  • 1,567
  • 2
  • 25
  • 53

1 Answers1

1

You need to remove the key= in the token in POSTMAN. You just need to specify the generated JWT token.

Ziko10
  • 105
  • 1
  • 10