public void WriteTokenTest()
        {
            //Arrange
            JwtAuthenticationManager jwtAuthenticationManager = new JwtAuthenticationManager();

            //Act
            var result = jwtAuthenticationManager.WriteToken(Guid.NewGuid(), Models.Roles.User);

            //Assert
            Assert.NotNull(result);
        }
    public IActionResult Login([FromForm] AuthenticationRequest request)
    {
        var JwtAuthenticationManager = new JwtAuthenticationManager();
        var authResult = JwtAuthenticationManager.Authenticate(request.UserName, request.Password);

        if (authResult == null)
        {
            return(Unauthorized());
        }
        return(Ok(authResult));
    }
        public void GetRoleTest()
        {
            //Arrange
            JwtAuthenticationManager jwtAuthenticationManager = new JwtAuthenticationManager();

            var id = Guid.NewGuid();

            var token = jwtAuthenticationManager.WriteToken(id, Models.Roles.User);

            //Act
            var result = jwtAuthenticationManager.GetRole(token);

            //Assert
            Assert.AreEqual(Models.Roles.User.ToString(), result);
        }