コード例 #1
0
 public void DestroySession()
 {
     _localStorage.RemoveItem("isloggedin"); _isLoggedIn     = false;
     _localStorage.RemoveItem("loginName"); _loginName       = String.Empty;
     _localStorage.RemoveItem("emailAddress"); _emailAddress = String.Empty;
     _localStorage.RemoveItem("displayName"); _displayName   = String.Empty;
 }
コード例 #2
0
        public async Task LogoutAsync()
        {
            await _localStorageService.RemoveItem("accessToken");

            await _localStorageService.RemoveItem("refreshToken");

            await _localStorageService.RemoveItem("email");
        }
コード例 #3
0
        /// <inheritdoc/>
        public async Task Logout()
        {
            await _localStorage.RemoveItem(LocalStorageConstants.AuthData);

            await _localStorage.RemoveItem(LocalStorageConstants.AuthToken);

            ((ApiAuthenticationStateProvider)_authenticationStateProvider).MarkUserAsLoggedOut();
        }
コード例 #4
0
        public async Task Logout()
        {
            Auth = null;
            await _localStorageService.RemoveItem("user");

            await _localStorageService.RemoveItem("auth");

            _navigationManager.NavigateTo("login");
        }
        public async Task Logout()
        {
            User = null;
            await _localStorageService.RemoveItem(StaticValues.BEARER);

            await _localStorageService.RemoveItem(StaticValues.USERLS);

            _navigationManager.NavigateTo("login");
        }
コード例 #6
0
        public async Task Logout()
        {
            User = null;
            await _localStorageService.RemoveItem(_userKey);

            _navigationManager.NavigateTo("account/login");
        }
        public async Task Logout()
        {
            cliente = null;
            await _localStorageService.RemoveItem("Clientes");

            _navigationManager.NavigateTo("login");
        }
コード例 #8
0
        public async Task SignOutAsync()
        {
            User = null;
            await _localStorageService.RemoveItem("user");

            _navigationManager.NavigateTo("signin");
        }
コード例 #9
0
        public async Task Logout()
        {
            await _localStorage.RemoveItem("authToken");

            ((ApiAuthenticationStateProvider)_authenticationStateProvider).MarkUserAsLoggedOut();
            _httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("bearer", "");
        }
コード例 #10
0
        public async Task Logout()
        {
            await _storageService.RemoveItem("token");

            userClaims      = null;
            IsAuthenticated = false;
            _navigationManager.NavigateTo("account/login");
        }
コード例 #11
0
        public async Task Logout()
        {
            User = null;

            await _localStorageService.RemoveItem("tokenModel");

            _navigationManager.NavigateTo("login");
        }
コード例 #12
0
        public async Task Logout()
        {
            User = null;
            await _localStorageService.RemoveItem("user");

            _schedulesState.Clear();
            _scheduleItemsState.Clear();
            _navigationManager.NavigateTo("", true);
        }
コード例 #13
0
        public async Task Login(string username, string password)
        {
            ///Do poprawy dzia³a ale najpierw powinienem pobraæ dane zeby sprawdziæ czy jest taki goœc i dopiero go zapisac w lokal

            User = new User()
            {
                AuthData = $"{username}:{password}".EncodeBase64()
            };
            await _localStorageService.SetItem("user", User);

            UserData = await _httpService.Get <User>("/Users/me");

            if (UserData != null)
            {
                await _localStorageService.SetItem("userData", UserData);
            }
            else
            {
                await _localStorageService.RemoveItem("user");
            }
        }
コード例 #14
0
ファイル: AuthServices.cs プロジェクト: Tonparn/COS2209
 public async Task RemoveAccessTokenAsync()
 => await _localStorage.RemoveItem("authToken");
コード例 #15
0
        public async Task Logout()
        {
            await _localStorage.RemoveItem("authToken");

            IsLoggedIn = false;
        }
コード例 #16
0
 public async Task Logout()
 {
     await _localStorageService.RemoveItem("user");
 }