示例#1
0
        public AccessToken Login([FromBody] dynamic credentials)
        {
            string name     = credentials.name;
            string password = credentials.password;

            if (!playerRepo.login(name, password))
            {
                throw new UnauthorizedAccessException();
            }

            return(CreateAccessToken(playerRepo.getID(name)));
        }