增加 B2C 自定义策略中的刷新令牌生命周期

nyo*_*ung 3 azure-ad-b2c

我能够为我的自定义 B2C 策略检索刷新令牌,但希望将令牌生命周期增加到最大限制或将滑动窗口生命周期设置为无到期。

这可以通过基本策略的 Azure 门户 B2C 设置完成,但在自定义策略的门户中不可用。

https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-token-session-sso#token-lifetimes-configuration

如何在我的策略中配置它?

Par*_*akh 5

看看这篇文章

在您的 RP 技术配置文件中具体添加以下内容。

<Item Key="token_lifetime_secs">3600</Item>
Run Code Online (Sandbox Code Playgroud)

看起来像这样(从文档中复制)

<ClaimsProviders>
   <ClaimsProvider>
      <DisplayName>Token Issuer</DisplayName>
      <TechnicalProfiles>
         <TechnicalProfile Id="JwtIssuer">
            <Metadata>
               <Item Key="token_lifetime_secs">3600</Item>
               <Item Key="id_token_lifetime_secs">3600</Item>
               <Item Key="refresh_token_lifetime_secs">1209600</Item>
               <Item Key="rolling_refresh_token_lifetime_secs">7776000</Item>
               <Item Key="IssuanceClaimPattern">AuthorityAndTenantGuid</Item>
               <Item Key="AuthenticationContextReferenceClaimPattern">None</Item>
            </Metadata>
         </TechnicalProfile>
      </TechnicalProfiles>
   </ClaimsProvider>
</ClaimsProviders>
Run Code Online (Sandbox Code Playgroud)