Beispiel #1
0
 /// <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);
 }
Beispiel #2
0
 /// <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);
 }
Beispiel #3
0
 /// <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);
 }