Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

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 ajoutée par Test User
Date de publication: 2015/11/10
Hafiz Muhammad Haroon Akram Muhammad Akram
par 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

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?