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))); }