Skip to content

Watchlist with Springboot #369

@kitare17

Description

@kitare17

What is the issue?

I use this method to authenticate user with
@PostMapping("/pusher/user-auth")
public ResponseEntity userAuthP() {
System.out.println("POST user auth");
PusherOptions options =
new PusherOptions()
.setUserAuthenticator(new HttpUserAuthenticator("http://127.0.0.1:5500/checkonline.html"));
com.pusher.client.Pusher pusher = new com.pusher.client.Pusher(key, options);

    pusher.signin();
    Map<String, String> stringStringMap = new HashMap<>();
    stringStringMap.put("auth", "user");
    stringStringMap.put("user_data", "test");
    return ResponseEntity.ok(stringStringMap);
}

In FE, I use
pusher.signin();

    const watchlistEventHandler = (event) => {
        console.log("Watching list", event);

    };
    pusher.user.watchlist.bind('online', watchlistEventHandler);
    pusher.user.watchlist.bind('offline', watchlistEventHandler);

but check in console log
image
How can I config with java in right way?
CC @pusher/mobile

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions