Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var client = AmazonClient(sessionConfig, requestconfig);
- client.GetClientTokens();
- var cred = new CognitoAWSCredentials(_sessionConfig.IdentityPoolId,` RegionEndpoint.EUCentral1);
- var provider = new AmazonCognitoIdentityProviderClient(cred, RegionEndpoint.EUCentral1);
- CognitoUserPool userPool = new CognitoUserPool(_sessionConfig.UserPoolId, _sessionConfig.ClientId, provider);
- CognitoUser user = new CognitoUser(_sessionConfig.UserPoolId, _sessionConfig.ClientId, userPool, provider, _sessionConfig.Secret, _sessionConfig.UserName);
- var authRequest = new InitiateSrpAuthRequest()
- {
- Password = _sessionConfig.Password
- };
- AuthFlowResponse authResponse = await user.StartWithSrpAuthAsync(authRequest).ConfigureAwait(false);
- client.GetApiResource(absolutpath);
- _requestConfig.AbsolutePath = absolutePath;
- //Signmethod from Amazon
- GetSignedRequest();
- var responses = _webRequest.GetResponse();
- var result = responses.GetResponseStream();
- var data = string.Empty;
- using (var sr = new StreamReader(result))
- {
- data = sr.ReadToEnd();
- }
- return data;
- user.StartWithSrpAuthAsync(authRequest).ConfigureAwait(false);
Add Comment
Please, Sign In to add comment