WSO2 IS:如何设置 Commonauth 调用者路径
WSO2 IS: How to Set Commonauth Caller Path
我是 运行 WSO2 5.7.0,使用 OIDC 和隐式流程。我已将上下文根设置为 wso2-is
,因此授权端点位于 http://MY_DOMAIN/wso2-is/oauth2/authorize
。当我通过对 oauth2/authorize
端点的 GET 调用开始流程时,我被重定向到 http://MY_DOMAIN/authenticationendpoint/login.do?client_id=MY_CLIENT_ID&commonAuthCallerPath=%2Foauth2%2Fauthorize...
。
问题是它删除了上下文根,所以后来在隐式流中我被(错误地)重定向到 http://MY_DOMAIN/oauth2/authorize
,这失败了,因为 URL 缺少 [= 的上下文根10=]。代码中的How/where是commonAuthCallerPath
参数集吗?
根据 the official documentation,使用反向代理 是向 wso2 产品添加自定义上下文路径的推荐方法。
如果您不打算使用反向代理,我建议您按照以下步骤添加自定义上下文路径。但是,请注意,我仅使用 oauth2/oidc 测试了基本身份验证。
- 将
repository/conf/carbon.xml
中的WebContextRoot
设置为/wso2-is
以更改carbon管理控制台的上下文路径
- 将
repository/conf/carbon.xml
中的ProxyContextPath
设置为/wso2-is
- 通过添加前缀
wso2-is#
重命名 repository/deployment/server/webapps/
中的 oauth2.war
和 authenticationendpoint.war
通过在端口后添加上下文路径 /wso2-is
来更新 repository/conf/indeitiy/identity.xml
以下模式的所有相关实例
${carbon.protocol}://${carbon.host}:${carbon.management.port}/xxxxx
到
${carbon.protocol}://${carbon.host}:${carbon.management.port}/wso2-is/xxxxx
通过添加 /wso2-is
前缀
[= 更新 repository/conf/identity/application-authentication.xml
中的 AuthenticationEndpointURL
、AuthenticationEndpointRetryURL
和 AuthenticationEndpointMissingClaimsURL
值53=]
重新启动身份服务器
不要忘记,这不是 the documentation 中推荐的方式。
我是 运行 WSO2 5.7.0,使用 OIDC 和隐式流程。我已将上下文根设置为 wso2-is
,因此授权端点位于 http://MY_DOMAIN/wso2-is/oauth2/authorize
。当我通过对 oauth2/authorize
端点的 GET 调用开始流程时,我被重定向到 http://MY_DOMAIN/authenticationendpoint/login.do?client_id=MY_CLIENT_ID&commonAuthCallerPath=%2Foauth2%2Fauthorize...
。
问题是它删除了上下文根,所以后来在隐式流中我被(错误地)重定向到 http://MY_DOMAIN/oauth2/authorize
,这失败了,因为 URL 缺少 [= 的上下文根10=]。代码中的How/where是commonAuthCallerPath
参数集吗?
根据 the official documentation,使用反向代理 是向 wso2 产品添加自定义上下文路径的推荐方法。
如果您不打算使用反向代理,我建议您按照以下步骤添加自定义上下文路径。但是,请注意,我仅使用 oauth2/oidc 测试了基本身份验证。
- 将
repository/conf/carbon.xml
中的WebContextRoot
设置为/wso2-is
以更改carbon管理控制台的上下文路径 - 将
repository/conf/carbon.xml
中的ProxyContextPath
设置为/wso2-is
- 通过添加前缀
wso2-is#
重命名 通过在端口后添加上下文路径
/wso2-is
来更新repository/conf/indeitiy/identity.xml
以下模式的所有相关实例${carbon.protocol}://${carbon.host}:${carbon.management.port}/xxxxx
到${carbon.protocol}://${carbon.host}:${carbon.management.port}/wso2-is/xxxxx
通过添加
[= 更新/wso2-is
前缀repository/conf/identity/application-authentication.xml
中的AuthenticationEndpointURL
、AuthenticationEndpointRetryURL
和AuthenticationEndpointMissingClaimsURL
值53=]重新启动身份服务器
repository/deployment/server/webapps/
中的 oauth2.war
和 authenticationendpoint.war
不要忘记,这不是 the documentation 中推荐的方式。