Package org.keycloak.device
Class DeviceActivityManager
- java.lang.Object
- 
- org.keycloak.device.DeviceActivityManager
 
- 
 public class DeviceActivityManager extends Object - Author:
- Pedro Igor
 
- 
- 
Constructor SummaryConstructors Constructor Description DeviceActivityManager()
 - 
Method SummaryAll 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- 
getCurrentDevicepublic 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
 
 - 
attachDevicepublic 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 session
- session- the keycloak session
 
 
- 
 
-