Package io.jmix.core.security.impl
Class CurrentAuthenticationImpl
java.lang.Object
io.jmix.core.security.impl.CurrentAuthenticationImpl
- All Implemented Interfaces:
CurrentAuthentication
@Component("core_CurrentAuthentication")
public class CurrentAuthenticationImpl
extends Object
implements CurrentAuthentication
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authentication
Returns current authentication object.protected Locale
org.springframework.security.core.userdetails.UserDetails
getUser()
Returns the authenticated user.boolean
isSet()
void
setDeviceTimeZoneProvider
(DeviceTimeZoneProvider deviceTimeZoneProvider)
-
Constructor Details
-
CurrentAuthenticationImpl
public CurrentAuthenticationImpl()
-
-
Method Details
-
setDeviceTimeZoneProvider
@Autowired(required=false) public void setDeviceTimeZoneProvider(DeviceTimeZoneProvider deviceTimeZoneProvider) -
getAuthentication
public org.springframework.security.core.Authentication getAuthentication()Description copied from interface:CurrentAuthentication
Returns current authentication object.- Specified by:
getAuthentication
in interfaceCurrentAuthentication
-
getUser
public org.springframework.security.core.userdetails.UserDetails getUser()Description copied from interface:CurrentAuthentication
Returns the authenticated user. If you need to get the user substitution information use theCurrentUserSubstitution
.- Specified by:
getUser
in interfaceCurrentAuthentication
- Returns:
- currently authenticated user
-
getLocale
- Specified by:
getLocale
in interfaceCurrentAuthentication
- Returns:
- locale of the current authentication or default locale if current authentication doesn't contain locale information
-
getTimeZone
- Specified by:
getTimeZone
in interfaceCurrentAuthentication
- Returns:
- time zone of the current authentication or default time zone if current authentication doesn't contain time zone information
-
isSet
public boolean isSet()- Specified by:
isSet
in interfaceCurrentAuthentication
- Returns:
- true if authentication is set to
SecurityContext
-
getDefaultLocale
-