A
A
artshelom2017-04-08 18:01:45
Spring
artshelom, 2017-04-08 18:01:45

The correct logic would be the site and is it possible??

I am writing a website in spring. Will I do the logic correctly and will I be able to do this:
To authorize the user, I will make a filter, I will send the header to the page according to the principle: if the user is authorized, then one header, if not authorized, then another. Depending on what the filter writes.
Each page will have its own class, with its own session, depending on the content of the page
When moving from one page to another, the session is reset to zero

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Kosarev, 2017-04-10
@artshelom

It is possible to implement what you described, but this is absolutely the wrong approach.
Authorization and authentication are best implemented using Spring Security. It also makes no sense to conjure with sessions - Spring WebMVC can do all this. If you need some finer session management settings, then you can tweak the Spring Session (which is necessary in 0.001% of cases).
Before you implement something yourself, read the documentation, since the vast majority of tasks and problems have long been solved by standard means.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question