Azure AD B2C 如何更改令牌 exp 声明值
Azure AD B2C how to change the Token exp claim value
默认情况下,JWT 过期日期设置为一个月。当我在 Azure 门户中打开策略时,它说令牌生命周期设置为 60 分钟,但被忽略了。我尝试更改值但没有运气。
如何创建有效期为 1 小时的 JWT?
AAD B2C Token lifetimes configuration
Access & ID token lifetimes (minutes): The lifetime of the OAuth 2.0
bearer token used to gain access to a protected resource.
Default = 60 minutes.
Minimum (inclusive) = 5 minutes.
Maximum (inclusive) = 1440 minutes.
Refresh token lifetime (days): The maximum time period before which a
refresh token can be used to acquire a new access or ID token (and
optionally, a new refresh token, if your application had been granted
the offline_access scope).
Default = 14 days.
Minimum (inclusive) = 1 day.
Maximum (inclusive) = 90 days.
Refresh token sliding window lifetime (days): After this time period
elapses the user is forced to re-authenticate, irrespective of the
validity period of the most recent refresh token acquired by the
application. It can only be provided if the switch is set to Bounded.
It needs to be greater than or equal to the Refresh token lifetime
(days) value. If the switch is set to Unbounded, you cannot provide a
specific value.
Default = 90 days.
Minimum (inclusive) = 1 day.
Maximum (inclusive) = 365 days.
如何:
Follow these steps to navigate to the B2C features menu on the Azure portal.
Click Sign-up or sign-in policies. Note: You can use this feature on any policy type, not just on Sign-up or sign-in policies.
Open a policy by clicking it. For example, click on B2C_1_SiUpIn.
Click Edit at the top of the menu.
Click Token, session & single sign-on config.
Make your desired changes. Learn about available properties in subsequent sections.
Click OK.
Click Save on the top of the menu.
默认情况下,JWT 过期日期设置为一个月。当我在 Azure 门户中打开策略时,它说令牌生命周期设置为 60 分钟,但被忽略了。我尝试更改值但没有运气。
如何创建有效期为 1 小时的 JWT?
AAD B2C Token lifetimes configuration
Access & ID token lifetimes (minutes): The lifetime of the OAuth 2.0 bearer token used to gain access to a protected resource.
Default = 60 minutes. Minimum (inclusive) = 5 minutes. Maximum (inclusive) = 1440 minutes.
Refresh token lifetime (days): The maximum time period before which a refresh token can be used to acquire a new access or ID token (and optionally, a new refresh token, if your application had been granted the offline_access scope).
Default = 14 days. Minimum (inclusive) = 1 day. Maximum (inclusive) = 90 days.
Refresh token sliding window lifetime (days): After this time period elapses the user is forced to re-authenticate, irrespective of the validity period of the most recent refresh token acquired by the application. It can only be provided if the switch is set to Bounded. It needs to be greater than or equal to the Refresh token lifetime (days) value. If the switch is set to Unbounded, you cannot provide a specific value.
Default = 90 days. Minimum (inclusive) = 1 day. Maximum (inclusive) = 365 days.
如何:
Follow these steps to navigate to the B2C features menu on the Azure portal.
Click Sign-up or sign-in policies. Note: You can use this feature on any policy type, not just on Sign-up or sign-in policies.
Open a policy by clicking it. For example, click on B2C_1_SiUpIn.
Click Edit at the top of the menu.
Click Token, session & single sign-on config.
Make your desired changes. Learn about available properties in subsequent sections.
Click OK.
Click Save on the top of the menu.