title: Authentication AWS Cognito SRP
body: <p>I am writing a console POC to demo AWS cognito authentication - App Pool not federated identity, as our API gateway authentication mechanism (not hosted in AWS). This is being written in C#.</p>
  
  <p>I have successfully created a user, confirmed them; but now I need to authenticate to retrieve a JWT that an I can pass around and validate downstream.</p>
  
  <p>The following code</p>
  
  <pre><code> using (var client = new AmazonCognitoIdentityProviderClient())
              {
                 var initAuthRequest = new InitiateAuthRequest();
                     initAuthRequest.AuthParameters.Add("USERNAME", username);
                     initAuthRequest.AuthParameters.Add("PASSWORD", password);
                     initAuthRequest.ClientId = clientId;
                     initAuthRequest.AuthFlow = AuthFlowType.USER_SRP_AUTH;
                     var response = client.InitiateAuth(initAuthRequest);
                     WriteLine("auth ok");
              }
  </code></pre>
  
  <p>Yields this exception:</p>
  
  <blockquote>
    <p>An unhandled exception of type
    'Amazon.CognitoIdentityProvider.Model.InvalidParameterException'
    occurred in AWSSDK.Core.dll</p>
    
    <p>Additional information: Missing required parameter SRP_A</p>
  </blockquote>
  
  <p>I cannot find a way in the dotnet sdk of generating an SRP header, can anyone help?</p>
  
  <p>Thanks
  KH</p>