public static async Task <IActionResult> Run([HttpTrigger(AuthorizationLevel.Anonymous, "post")] HttpRequest httpRequest, ILogger log)
        {
            log.LogInformation("Received request for OAuth Token");

            using var reader = new StreamReader(httpRequest.Body);
            var body = await reader.ReadToEndAsync().ConfigureAwait(false);

            var generateTokenDTO = JsonConvert.DeserializeObject <GenerateTokenDTO>(body);

            var token = await GitHubAuthService.GetGitHubToken(_clientId, _clientSecret, generateTokenDTO.LoginCode, generateTokenDTO.State).ConfigureAwait(false);

            log.LogInformation("Token Retrived");

            return(new OkObjectResult(token));
        }
 public GenerateGitHubOAuthToken(GitHubAuthService gitHubAuthService) => _gitHubAuthService = gitHubAuthService;