简体   繁体   English

我得到 {"__type":"ResourceNotFoundException","message":"User pool client clientId does not exist."} while obtaing access token in karate API

[英]I'm getting {"__type":"ResourceNotFoundException","message":"User pool client clientId does not exist."} while obtaing access token in karate API

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我得到 {"__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我使用的脚本

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

here I'm passing refresh token and client Id from karate-config.js file.在这里,我从 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 

Feature: Get Token功能:获取令牌

Background:背景:

  • header Content-Type = 'application/x-amz-json-1.1' header Content-Type = 'application/x-amz-json-1.1'

  • header X-Amz-Target = 'AWSCognitoIdentityProviderService.InitiateAuth' 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场景: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

    • print response打印响应


here I'm passing refresh token and client Id from karate-config.js file. 

The only thing I can think of is this change:我唯一能想到的就是这个变化:

And request {"AuthParameters" : {"REFRESH_TOKEN" : '#(refreshToken)' },"AuthFlow" : "REFRESH_TOKEN_AUTH","ClientId" : '#(clientId)' } 

Refer the docs: https://github.com/karatelabs/karate#embedded-expressions参考文档: https://github.com/karatelabs/karate#embedded-expressions

Otherwise no one can help you if your request data is wrong.否则,如果您的请求数据有误,没有人可以帮助您。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ResourceNotFoundException: 用户池客户端 ****** 不存在 - ResourceNotFoundException: User pool client ****** does not exist PHP AWS Cognito '执行“注册”时出错:ResourceNotFoundException:用户池客户端 XXXX 不存在 - PHP AWS Cognito 'Error executing "SignUp" : ResourceNotFoundException : User pool client XXXX does not exist ResourceNotFoundException:用户池 xyz 不存在 - Cognito adminConfirmSignup - ResourceNotFoundException: user pool xyz does not exist - Cognito adminConfirmSignup “用户”类型不存在 Firebase updateProfile - Firebase updateProfile does not exist on type 'User' 在 Microsoft Azure 上基于客户端信用获取访问令牌时出现 CORS 错误 Angular 中 SPA 应用程序上的 AD 身份验证 - Getting CORS error while fetching access token based on client cred on Microsoft Azure AD authentication on SPA app in Angular 尝试访问公共 API 网关时出现“缺少身份验证令牌”错误消息 - "Missing Authentication Token" error message, while trying to access public API gateway 使用 terraform 创建 Cloud composer 2 时,显示错误,即无法配置工作负载身份:身份池不存在 - While creating Cloud composer 2 using terraform, it is showing error i.e. Could not configure workload identity: Identity Pool does not exist 为什么我使用谷歌 api 客户端获得的 oauth 访问令牌包含大量“...” - why does my oauth access token obtained using google api client contains plenty of '...' 我在 Amazon Elastic Bean Stalk 上尝试访问我的 spring boot 应用程序时收到错误 404 - I'm getting error 404 while trying to access my spring boot app on Amazon Elastic Bean Stalk 在 Cognito 用户池中注册时如何检查用户是否已存在具有相同 email 或电话号码的用户 - how to check if user already exist with same email or phone number while registration in Cognito user pool
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM