Package org.keycloak.device
Class DeviceActivityManager
- java.lang.Object
-
- org.keycloak.device.DeviceActivityManager
-
public class DeviceActivityManager extends Object
- Author:
- Pedro Igor
-
-
Constructor Summary
Constructors Constructor Description DeviceActivityManager()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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
.
-
-
-
Method Detail
-
getCurrentDevice
public static DeviceRepresentation getCurrentDevice(UserSessionModel userSession)
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
public static 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.- Parameters:
userSession
- the user sessionsession
- the keycloak session
-
-