public async Task <AppUser> AddSystemUser
        (
            AppKey appKey,
            string machineName,
            IHashedPassword password,
            DateTimeOffset timeAdded
        )
        {
            var user = await Add
                       (
                AppUserName.SystemUser(appKey, machineName),
                password,
                new PersonName($"{appKey.Name.DisplayText.Replace(" ", "")} {appKey.Type.DisplayText.Replace(" ", "")} {machineName}"),
                new EmailAddress(""),
                timeAdded
                       );

            var app = await factory.Apps().App(appKey);

            var role = await app.Role(AppRoleName.System);

            await user.AddRole(role);

            return(user);
        }
Example #2
0
 public Task <App> App() => factory.Apps().App(record.AppID);
Example #3
0
 internal Task <App> App() => factory.Apps().App(record.AppID);
 public async Task <IApp> App() => await appFactory.Apps().App(appKey);