in src/Amazon.Extensions.CognitoAuthentication/CognitoUserPool.cs [188:210]
public async Task<CognitoUser> FindByIdAsync(string userID)
{
if (string.IsNullOrEmpty(userID))
throw new ArgumentException(nameof(userID));
try
{
var response = await Provider.AdminGetUserAsync(new AdminGetUserRequest
{
Username = userID,
UserPoolId = this.PoolID
}).ConfigureAwait(false);
return new CognitoUser(response.Username, ClientID, this, Provider, ClientSecret,
response.UserStatus.Value, response.Username,
response.UserAttributes.ToDictionary(attribute => attribute.Name, attribute => attribute.Value));
}
catch (UserNotFoundException)
{
return null;
}
}