We use cookies to serve our customers and website visitors in the best possible way. Cookies are used for the proper functioning of the website and for improving the user experience, monitoring visitor traffic and marketing purposes. By continuing to browse the site, you agree to our use of cookies. You can read more about cookies here.
com.vaadin.hilla.
Package com.vaadin.hilla
Class AuthenticationUtil
java.lang.Object
com.vaadin.hilla.AuthenticationUtil
Helpers for authentication related tasks.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.springframework.security.core.Authentication
Gets the authenticated user from the Spring SecurityContextHolder.
Gets a function for checking if the authenticated user from the Spring SecurityContextHolder is in a given role.
-
Constructor Details
-
AuthenticationUtil
public AuthenticationUtil()
-
-
Method Details
-
getSecurityHolderAuthentication
public static org.springframework.security.core.Authentication getSecurityHolderAuthentication()Gets the authenticated user from the Spring SecurityContextHolder.
Returns:
the authenticated user or
null
-
getSecurityHolderRoleChecker
Gets a function for checking if the authenticated user from the Spring SecurityContextHolder is in a given role.
Returns:
a function for checking if the given user has the given role
-