Package io.jmix.core.security
Interface CurrentAuthentication
- All Known Implementing Classes:
- CurrentAuthenticationImpl
public interface CurrentAuthentication
Provides information about the currently authenticated user.
- 
Method Details- 
getAuthenticationorg.springframework.security.core.Authentication getAuthentication()Returns current authentication object.- Throws:
- IllegalStateException- if Authentication is not set to- SecurityContext
 
- 
getUserorg.springframework.security.core.userdetails.UserDetails getUser()Returns the authenticated user. If you need to get the user substitution information use theCurrentUserSubstitution.- Returns:
- currently authenticated user
- Throws:
- RuntimeException- if Authentication is not set to- SecurityContextor user information cannot be extracted from current authentication
 
- 
getLocaleLocale getLocale()- Returns:
- locale of the current authentication or default locale if current authentication doesn't contain locale information
- Throws:
- RuntimeException- if Authentication is not set to- SecurityContext
 
- 
getTimeZoneTimeZone getTimeZone()- Returns:
- time zone of the current authentication or default time zone if current authentication doesn't contain time zone information
- Throws:
- RuntimeException- if Authentication is not set to- SecurityContext
 
- 
isSetboolean isSet()- Returns:
- true if authentication is set to SecurityContext
 
 
-