Active Role Store
Component Detail
Data Layer
low complexity
mobile
0
Dependencies
1
Dependents
0
Entities
0
Integrations
Description
Secure local persistence layer that stores the user's currently active role and their list of available roles. Uses the device keychain or secure storage to persist the active role selection across app restarts, ensuring the user returns to their last-used role context without requiring re-selection.
active-role-store
Responsibilities
- Persist the active role selection in secure local storage
- Store and retrieve the cached list of available roles for the user
- Provide synchronous access to current role state for app-wide consumption
Interfaces
saveActiveRole(UserRole role)
getActiveRole()
saveAvailableRoles(List<UserRole> roles)
getAvailableRoles()
clearRoleCache()