[英]Redirect after session or token timeout in identity server openid connect
I have asp.net core and identity server as openid connect server.我有 asp.net 核心和身份服务器作为 openid 连接服务器。 I want to redirect to a different page rather than the authority url when the token/session is expired due to inactivity.当令牌/会话由于不活动而过期时,我想重定向到不同的页面而不是权限 url。 Is there an easy way to do this using configuration or any other way this can be achieved?有没有一种简单的方法可以使用配置或任何其他方式来实现这一点?
The magic of redirect is done by the challenge which is set to use oidc
scheme.重定向的魔力是由设置为使用oidc
方案的挑战完成的。 Its set by adding DefaultChallengeScheme = "oidc"
on startup
.它通过在startup
时添加DefaultChallengeScheme = "oidc"
来设置。 To be able to do it in a custom way you need to add a custom challenge which is not as easy as setting some configs.为了能够以自定义方式执行此操作,您需要添加一个自定义挑战,这不像设置一些配置那么容易。 Read more here 在这里阅读更多
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.