Package org.keycloak.device
Class DeviceActivityManager
java.lang.Object
org.keycloak.device.DeviceActivityManager
- Author:
- Pedro Igor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
attachDevice
(UserSessionModel userSession, KeycloakSession session) Attaches a device to the givenuserSession
where the device information is obtained from theHttpHeaders.USER_AGENT
in the current request, if available.static DeviceRepresentation
getCurrentDevice
(UserSessionModel userSession) Returns the device information associated with the givenuserSession
.
-
Constructor Details
-
DeviceActivityManager
public DeviceActivityManager()
-
-
Method Details
-
getCurrentDevice
Returns the device information associated with the givenuserSession
.- Parameters:
userSession
- the userSession- Returns:
- the device information or null if no device is attached to the user session
-
attachDevice
Attaches a device to the givenuserSession
where the device information is obtained from theHttpHeaders.USER_AGENT
in the current request, if available.- Parameters:
userSession
- the user sessionsession
- the keycloak session
-