авторизация
This commit is contained in:
13
CyberBoom/AuthOptions.cs
Normal file
13
CyberBoom/AuthOptions.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System.Text;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
|
||||
public class AuthOptions
|
||||
{
|
||||
public const string ISSUER = "MyAuthServer"; // издатель токена
|
||||
public const string AUDIENCE = "MyAuthClient"; // потребитель токена
|
||||
const string KEY = "mysupersecret_secretkey!123"; // ключ для шифрации
|
||||
|
||||
public const int LIFETIME = 1;
|
||||
public static SymmetricSecurityKey GetSymmetricSecurityKey() =>
|
||||
new SymmetricSecurityKey(Encoding.UTF8.GetBytes(KEY));
|
||||
}
|
Reference in New Issue
Block a user