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 voidattachDevice(UserSessionModel userSession, KeycloakSession session)Attaches a device to the givenuserSessionwhere the device information is obtained from theHttpHeaders.USER_AGENTin the current request, if available.static DeviceRepresentationgetCurrentDevice(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 givenuserSessionwhere the device information is obtained from theHttpHeaders.USER_AGENTin the current request, if available.- Parameters:
 userSession- the user sessionsession- the keycloak session
 
 - 
 
 -