/// <summary> /// Set the claims about the active user and return the user model /// Authentication using jwt authentication /// </summary> /// <param name="jsRuntime"></param> /// <returns></returns> public static Task SetUserDataAsync(this IJSRuntime jsRuntime, string data) { jsRuntime.LocalStorageSetAsync("blazor", data); return(Task.CompletedTask); }
/// <summary> /// Set the access token and claims about the active user and return the user model /// Authentication using jwt authentication /// </summary> /// <param name="jsRuntime"></param> /// <returns></returns> public static Task SetAllDataAsync(this IJSRuntime jsRuntime, string data, string token) { jsRuntime.LocalStorageSetAsync("blazor", data); jsRuntime.LocalStorageSetAsync("token", token); return(Task.CompletedTask); }
/// <summary> /// Set the access token the active user and return the user model /// Authentication using jwt authentication /// </summary> /// <param name="jsRuntime"></param> /// <returns></returns> public static Task SetUserTokenAsync(this IJSRuntime jsRuntime, string token) { jsRuntime.LocalStorageSetAsync("token", token); return(Task.CompletedTask); }