コード例 #1
0
        public void LoginAs(string email)
        {
            var login = LoginResourceAlter.Value.Create(cr => cr.Email = email).Value;

            token        = login.Token;
            UserResource = login.User;
            OnTokenChange?.Invoke(this, token);
        }
コード例 #2
0
        public void LoginAsAdmin()
        {
            isLoggin = true;
            var login = LoginResourceAlter.Value.Create(new LoginAlterResource()
            {
                Email    = Config.AdminUser,
                Password = Config.AdminPassword
            }).Value;

            token        = login.Token;
            UserResource = login.User;
            OnTokenChange?.Invoke(this, token);
            isLoggin = false;
        }
コード例 #3
0
 public void Logout()
 {
     token        = null;
     UserResource = null;
     OnTokenChange?.Invoke(this, token);
 }