E
E
Ernest Farukshin2020-01-13 21:04:23
Java
Ernest Farukshin, 2020-01-13 21:04:23

How to keep the user logged in to the application?

I want to make a messenger in JAVA (I'm still planning how it should work). The question arose of how to keep the user authorized, that is, do you need something like a cookie at all (The server will be built on multiplexing) or just save the socket with the user's login in the HashMap (I did this when writing a chat).

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Cheremisin, 2020-01-13
@Ernest3

Signed cookies, cookie key (the data itself is in the database), key in headers, jwt in aphid cookies headers. Choose what you want.

O
Orkhan, 2020-01-14
Hasanly @azerphoenix

And for example, when I recently wrote an application, I used the capabilities of Spring Boot.
Spring Boot + Spring Security + JavaFX. Spring is responsible for authorization and storage of user data...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question