Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

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

user-image
Question added by Test User
Date Posted: 2015/11/10
Hafiz Muhammad Haroon Akram Muhammad Akram
by 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

 

 

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.