从功能 B 中的功能 A 中检索 JWT

阿诺米歇尔

我正在尝试从功能 B 中的功能 A 中检索 JWT。

为此,我在功能 A 中有:

# create API access for the client
Given url baseUrl
And path 'admin', 'clients', clientApiId, 'accesses', 'api', 'api-key', 'renew'
And header Authorization = 'Bearer ' + authenticationJWT
When method put
Then status 200

* def clientApiJWT = response

在功能 B 中:

# Create a process with API access
* def clientApiAccess = call read('classpath:karate/common/create-client-api-access.feature')
* clientApiJWT = clientApiAccess.clientApiJWT

使用此代码,我可以恢复以下错误:

在此处输入图像描述

感谢您的帮助

彼得·托马斯

不应该是:

* def clientApiJWT = clientApiAccess.clientApiJWT

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章