private async Task _AzureContext_AfterUserSignOut() { ResetForm(); this.IsSourceContextAuthenticated = false; await AfterUserSignOut?.Invoke(); }
public async Task Logout() { if (BeforeUserSignOut != null) { await BeforeUserSignOut.Invoke(); } await this.SetTenantContext(null); _AzureRetriever.ClearCache(); _TokenProvider.AuthenticationResult = null; if (AfterUserSignOut != null) { await AfterUserSignOut?.Invoke(); } }
//internal void SetAzureContext(AzureContext azureContext) //{ // this.AzureEnvironment = azureContext.AzureEnvironment; // _AzureRetriever = azureContext.AzureRetriever; // _TokenProvider = azureContext.TokenProvider; // if (this.TokenProvider != null) // { // UserAuthenticated?.Invoke(this.TokenProvider.AuthenticationResult.UserInfo); // } //} public async Task Logout() { if (BeforeUserSignOut != null) { await BeforeUserSignOut.Invoke(); } await this.SetSubscriptionContext(null); _AzureRetriever = null; _TokenProvider = null; if (AfterUserSignOut != null) { await AfterUserSignOut?.Invoke(); } }