如何将saml身份验证的令牌响应与用户池一起用于检索aws临时访问密钥和进行api网关调用?
我已经为cognito用户池配置了一个关联的app客户端。我已经将okta配置为第三方saml身份提供程序。使用amazon托管的登录
https://[cognito domain name]/login?response_type=token&client_id=[your App client id]&redirect_uri=[your App client redirect URL]
我可以通过
#access_token
在标题中。
我正在尝试使用
#访问令牌
调用API网关。我一直在关注这个
guide
以及aws放大。据我所知,我需要使用
#访问令牌
获取aws访问密钥以调用api网关。
我尝试使用以下代码执行此操作:
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: 'us-east-1:xxxxxxx-xxxx-xxxx-xxxx-xxxxxx',
Logins: {
'cognito-idp.us-east-1.amazonaws.com/us-east-1_xxxxxx': #access_token
}
});
但不确定这是如何与aws amplify集成的,而且我还没有成功地检索到aws临时访问密钥来进行api网关调用。
我以前在cognito用户池中使用过用户,但现在我需要将okta作为身份提供者。