public async Task RunAsync() { using (CurrentTenant.Change(Guid.NewGuid())) { using (PluzIdentityClientSwitcher.Use("Internal")) { await Assert("Call SampleAppService with no auth.", async() => await _sampleAppService.GetAsync()); } } }
public async Task RunAsync() { var output = await _profileAppService.GetAsync(); Console.WriteLine($"UserName : {output.UserName}"); Console.WriteLine($"Email : {output.Email}"); Console.WriteLine($"Name : {output.Name}"); Console.WriteLine($"Surname : {output.Surname}"); await _demoAppService.AccessWithDefaultPasswordAuthAsync(); // await _demoAppService.AccessWithClientAuthAsync();// will throw using (PluzIdentityClientSwitcher.Use("client")) { await _demoAppService.AccessWithClientAuthAsync();// will not throw } }