[英]ResourceNotFoundException: User pool client ****** does not exist
[英]I'm getting {"__type":"ResourceNotFoundException","message":"User pool client clientId does not exist."} while obtaing access token in karate API
我得到 {"__type":"ResourceNotFoundException","message":"User pool client clientId does not exist."} while obtaing access token in karate API framework and status code was 400
我使用的脚本
Feature: Get Token
Background:
* header Content-Type = 'application/x-amz-json-1.1'
* header X-Amz-Target = 'AWSCognitoIdentityProviderService.InitiateAuth'
Scenario: GEt access token
Given url 'https://cognito-idp.us-east-1.amazonaws.com/'
And request {"AuthParameters" : {"REFRESH_TOKEN" : refreshToken},"AuthFlow" : "REFRESH_TOKEN_AUTH","ClientId" : clientId }
When method post
Then status 200
* print response
在这里,我从 karate-config.js 文件传递刷新令牌和客户端 ID。
I'm getting {"__type":"ResourceNotFoundException","message":"User pool client clientId does not exist."} while obtaing access token in karate API framework and status code was 400
Script I used
功能:获取令牌
背景:
header Content-Type = 'application/x-amz-json-1.1'
header X-Amz-Target = 'AWSCognitoIdentityProviderService.InitiateAuth'
场景:GEt 访问令牌给定 url 'https://cognito-idp.us-east-1.amazonaws.com/' 并请求 {"AuthParameters": {"REFRESH_TOKEN": refreshToken},"AuthFlow": "REFRESH_TOKEN_AUTH", "ClientId": clientId } When method post Then status 200
here I'm passing refresh token and client Id from karate-config.js file.
我唯一能想到的就是这个变化:
And request {"AuthParameters" : {"REFRESH_TOKEN" : '#(refreshToken)' },"AuthFlow" : "REFRESH_TOKEN_AUTH","ClientId" : '#(clientId)' }
参考文档: https://github.com/karatelabs/karate#embedded-expressions
否则,如果您的请求数据有误,没有人可以帮助您。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.