ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

In Spring controller want to programatically(not application context)login once so someone else login with same username it doesn't allow.

user-image
تم إضافة السؤال من قبل Test User
تاريخ النشر: 2015/11/10
Hafiz Muhammad Haroon Akram Muhammad Akram
من قبل Hafiz Muhammad Haroon Akram Muhammad Akram , Research And Develoment , Zeej Printing and Marketing

AuthenticationTrustResolver interface provides an isAnonymous(Authentication) method, which allows interested classes to take into account this special type of authentication status. The ExceptionTranslationFilter uses this interface in processing AccessDeniedExceptions. If an AccessDeniedException is thrown, and the authentication is of an anonymous type, instead of throwing a (forbidden) response, the filter will instead commence the AuthenticationEntryPoint so the principal can authenticate properly. This is a necessary distinction, otherwise principals would always be deemed “authenticated” and never be given an opportunity to login via form, basic, digest or some other normal authentication mechanism with this very are able to control user not let to login again

 

 

المزيد من الأسئلة المماثلة