This crate implements authentication handling and user management for players. It consists of three main components:
A thread-safe type that can be freely cloned and passed around. This can be used to access the current user, and internally manages the process(es) for locating and finding the user.json
file that signals whether a user is authenticated.
This internally is Arc
s throughout, so you don't need to wrap it in an Arc
yourself if you're storing it elsewhere.
A type that reflects various user properties. You can retrieve a reference to the current user by doing:
// Call `.get()` to glob properties from the current user.
let play_key = user_manager.get(|user| {
user.play_key.clone()
});
The background thread that manages watching for and parsing user.json
files.