Quantcast
Channel: Spring Community Forums - SAML
Viewing all articles
Browse latest Browse all 56

Determine whether user logged in or not?

$
0
0
Hi everybody, I want to check if user logged successfuly or not? I just try to use a method like this:

Code:

        try {
                  boolean isAuthenticated = SecurityContextHolder.getContext().getAuthentication().isAuthenticated();
                  return isAuthenticated;
        } catch (Exception e) {
                  return false;
        }

But SecurityContextHolder.getContext().getAuthenticati on().isAuthenticated() always returns true. Any solution for this problem?

Thanks in advance.

Viewing all articles
Browse latest Browse all 56

Trending Articles