Raj*_*Raj 0 azure-active-directory azure-ad-graph-api azure-ad-b2c
我已经提出了刷新令牌撤销问题,它会在 1-5 分钟后起作用。
但它仅适用于内置策略(用户流),不适用于自定义策略。
我从内置策略中获得了refresh_token A,从自定义策略中获得了refresh_token B。
同一租户中的同一用户会收到这两个令牌。
执行撤销(Graph API)后,当我尝试使用refresh_token A获取新的访问和刷新令牌时,它失败了。但是当我尝试使用refresh_token B(通过自定义策略接收)时,它仍然有效。能够获得新的代币。
我在撤销呼叫后给了 15 分钟的时间间隔。
请帮我解决这个问题。
使用自定义策略在 Azure Active Directory B2C 中配置资源所有者密码凭据流一文介绍了必须实现的自定义元素,以管理刷新令牌并测试已颁发的令牌尚未失效。
你必须:
默认情况下,时钟偏差设置为 0,但您可以使用AssertRefreshTokenIssuedLaterThanValidFromDate声明转换的TreatAsEqualIfWithinMillseconds参数更改此设置:
<ClaimsTransformation Id="AssertRefreshTokenIssuedLaterThanValidFromDate" TransformationMethod="AssertDateTimeIsGreaterThan">
<InputClaims>
<InputClaim ClaimTypeReferenceId="refreshTokenIssuedOnDateTime" TransformationClaimType="leftOperand" />
<InputClaim ClaimTypeReferenceId="refreshTokensValidFromDateTime" TransformationClaimType="rightOperand" />
</InputClaims>
<InputParameters>
<InputParameter Id="AssertIfEqualTo" DataType="boolean" Value="false" />
<InputParameter Id="AssertIfRightOperandIsNotPresent" DataType="boolean" Value="true" />
<!-- Set the clock skew to 5 minutes (300000 milliseconds). -->
<InputParameter Id="TreatAsEqualIfWithinMillseconds" DataType="int" Value="300000" />
</InputParameters>
</ClaimsTransformation>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1635 次 |
| 最近记录: |