Přidání nového projektu - pokus o explorer
This commit is contained in:
1 parent
b0b0b3ee34
commit
d06a9f332b
48 files changed
+1429
No files matched your search
@@ -0,0 +1,21 @@
|
||||
namespace winui_learning_2.Services;
|
||||
|
||||
public static class AuthSession
|
||||
{
|
||||
public static string? Token { get; private set; }
|
||||
public static string? Username { get; private set; }
|
||||
|
||||
public static bool IsAuthenticated => !string.IsNullOrEmpty(Token);
|
||||
|
||||
public static void SignIn(string username, string? token)
|
||||
{
|
||||
Username = username;
|
||||
Token = token;
|
||||
}
|
||||
|
||||
public static void SignOut()
|
||||
{
|
||||
Username = null;
|
||||
Token = null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user