0

I'm trying to send a CSRF authentication with pusher, this is the part of code involved:

Map<String, String> authHeader = new HashMap<>();
authHeader.put("X-AUTH-Token", "<key>");
HttpAuthorizer authorizer = new HttpAuthorizer("<pusher auth>");
authorizer.setHeaders(authHeader);
PusherOptions options = new PusherOptions().setAuthorizer(authorizer).setCluster("eu");
Pusher pusher = new Pusher("f6cab614ad01473962d2", options);

It doesn't work:) Gives no error but simply doesn't authenticate (the wss' are public but if not authenticated, it won't work past 30secs)

1 Answers1

0

The authentication takes place upon subscription to a private or presence channel - are you subscribing to such channels?

Source: https://pusher.com/docs/channels/server_api/authenticating-users/

doydoy
  • 4,021
  • 3
  • 20
  • 33