是否可以撤销AWS Cognito IdToken? [英] Is it possible to revoke AWS Cognito IdToken?

查看:365
本文介绍了是否可以撤销AWS Cognito IdToken?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以撤销 AWS Cognito IdToken 在用户身份验证后获得用户名密码

Is it possible to revoke AWS Cognito IdToken got after user authentication with it's username and password?

在我的用例中,对 API网关端点的访问受 Cognito用户池授权程序的限制 IdToken 作为 request.headers.Authorizer 中的参数。我正在寻找阻止当前用户的 IdToken 的方法。

In my usecase the access to API Gateway endpoints is restricted by Cognito User Pool Authorizer which takes IdToken as an argument in request.headers.Authorizer. I am looking for way to block current user's IdToken.

AWSJavaScriptSDK 是一个函数 globalSignOut({AccessToken}),它撤销 accessToken
http://docs.aws.amazon.com/AWSJavaScriptSDK/最新/ AWS / CognitoIdentityServiceProvider.html#globalSignOut-property

In AWSJavaScriptSDK is a function globalSignOut({AccessToken}) which revokes the accessToken: http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CognitoIdentityServiceProvider.html#globalSignOut-property

是否可以撤销 IdToken 相同或相似的方式?

Is it possible to revoke the IdToken the same or similar way?

感兴趣:我在上创建了一个问题aws-sdk-js
https://github.com / aws / aws-sdk -js / issues / 1687

推荐答案

@ AllanFly120 写道主题


因为IdToken表示为JSON Web Key Token,所以它使用秘密或私钥/公钥对签署
,这意味着即使你
撤销IdToken,无法撤销分发的公共
密钥
。而IdToken的寿命很短,它将在短暂的
时间到期。

Because IdToken is represented as a JSON Web Key Token, it's signed with a secret or private/public key pairs, which means even if you revoke the IdToken, there is no way to revoke the distributed public key. And IdToken has a short life span, it will expire in a short time.

它解决了我的疑虑。

这篇关于是否可以撤销AWS Cognito IdToken?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆