Skip to content

Authentication

Tim edited this page Jul 10, 2016 · 1 revision

Different Entities and systems are only authorized for certain players, with different types of authentication availble (view, control, sharing data, etc). This is defined in the Player.cs file under the enum AccessRole. Each player has their own AuthenticationToken, which contains the player's Guid and a password for them.

Authorization is checked in the EntityAccessControl static class in EntityAccessControl.cs. The IsAuthorized function checks a given entity for authorization given the game variable and an AuthenticationToken. It returns a boolean indicating whether that entity is authorized. This function is currently used in the "GetAllEntitiesWith" functions (some of them) in the EntityManager class in EntityManager.cs. These functions are used in the Game.cs file, in various tests, and in the SystemView view models.

Clone this wiki locally