Oauth 如何使用KeyClope将查询参数转发给外部身份提供程序?

Oauth 如何使用KeyClope将查询参数转发给外部身份提供程序?,oauth,keycloak,openid-connect,identity,Oauth,Keycloak,Openid Connect,Identity,在KeyClope中创建身份提供者IdP时,可以选择将查询参数转发给外部IdP。我怎么用这个? 我想转发,比如说,启动参数到外部IdP。我在KeyClope配置页面的Forwarded Query Parameters字段中提到了启动。我正在我的locahost:9090上使用一个应用程序,受Keyclaok保护。当我访问http://localhost:9090?launch=abc 此参数未转发到外部IdP。我正在为我们的spring boot应用程序使用KeyClope spring b

在KeyClope中创建身份提供者IdP时,可以选择将查询参数转发给外部IdP。我怎么用这个?

我想转发,比如说,启动参数到外部IdP。我在KeyClope配置页面的Forwarded Query Parameters字段中提到了启动。我正在我的locahost:9090上使用一个应用程序,受Keyclaok保护。当我访问http://localhost:9090?launch=abc 此参数未转发到外部IdP。我正在为我们的spring boot应用程序使用KeyClope spring boot starter

另外,从中,我看到转发参数附加了一些前缀,即client_request_param,因此我尝试使用http://localhost:9090?client_request_param_launch=abc 但是没有运气

AuthorizationEndpoint.LOGIN\u会话\u注释\u附加\u请求\u参数\u前缀=客户端\u请求\u参数_


注:我使用的是keydape 7.0.0。

我猜转发的查询参数是附加到初始代码流请求的非OIDC参数-如果在该IdP的列表中指定,这些参数随后被转发到IdP

String forwardParameterConfig = getConfig().getForwardParameters() != null ? getConfig().getForwardParameters(): "";
List<String> forwardParameters = Arrays.asList(forwardParameterConfig.split("\\s*,\\s*"));
for(String forwardParameter: forwardParameters) {
    String name = AuthorizationEndpoint.LOGIN_SESSION_NOTE_ADDITIONAL_REQ_PARAMS_PREFIX + forwardParameter.trim();
    String parameter = request.getAuthenticationSession().getClientNote(name);
    if(parameter != null && !parameter.isEmpty()) {
        uriBuilder.queryParam(forwardParameter, parameter);
    }
}