private string _generateRefreshToken(int id)
        {
            IJWTContainerModel jwtModel = StaticJWTContainer.GetAuthModel(id.ToString());

            jwtModel.SecretKey     = _secretKeyRefreshToken;
            jwtModel.ExpireMinutes = 13;
            _jwtService.SetVariable(jwtModel.SecretKey);
            return(_jwtService.GenerateToken(jwtModel));
        }
        private string _generateToken(int id)
        {
            string             token    = null;
            IJWTContainerModel jwtModel = StaticJWTContainer.GetAuthModel(id.ToString());

            _jwtService.SetVariable(jwtModel.SecretKey);
            token = _jwtService.GenerateToken(jwtModel);
            return(token);
        }
 public JWTAuthAttribute(EUserRole[] roles)
 {
     _roles         = roles;
     _authModel     = StaticJWTContainer.GetAuthModel();
     _jwtService    = new JWTService();
     _isCanAccess   = false;
     _objectService = new ObjectService <UserModel>();
     _jwtService.SetVariable(_authModel.SecretKey);
     _db = new DBCovalmor();
 }