C
C
CorruptedMAn2014-11-05 23:20:00
MySQL
CorruptedMAn, 2014-11-05 23:20:00

How to implement access to the application after authorization in Java?

It is necessary that access to some application functions be available only after authorization directly in the application. Search reduces everything to web applications, and I have a standard window application. Is it possible to implement this in Java, and if so, how?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
Nikolai, 2014-11-06
@j_wayne

Just checks. With good architecture, this does not look cumbersome in a regular application. Use a pattern, for example, unit of work, and check permissions before performing actions. In order not to write the same thing over and over, you can build something with reflection or on aspects. If you really want something ready-made, spring security core is also suitable for stand alone applications. Everything depends on your needs.

V
Viktor Koltcov, 2014-11-06
@Vityarik

Java has a standard JAAS api for this purpose. Try to consider it.

V
Vasily, 2014-11-08
@Applez

I recommend using AOP for this. It will greatly simplify your life if you decide to do it yourself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question