Esempio n. 1
0
        private async Task _AzureContext_AfterUserSignOut()
        {
            ResetForm();
            this.IsSourceContextAuthenticated = false;

            await AfterUserSignOut?.Invoke();
        }
Esempio n. 2
0
        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();
            }
        }
Esempio n. 3
0
        //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();
            }
        }