使用参数clientid、redirecturi和actions调用executeActionsMail时有http 400错误请求,但使用参数actions和actions、lifespan可以正常工作。
UserRepresentation userrep = getUserRepresentation(email);
String userId = userrep.getId();
UserResource urs = usersRessource.get(userId);
urs.executeActionsEmail(Arrays.asList("UPDATE_PASSWORD", "VERIFY_EMAIL", "UPDATE_PROFILE"));
上面的代码工作正常,但当我传递参数clientid、redirecturi和actions时,它抛出异常。
UserRepresentation userrep = getUserRepresentation(email);
String userId = userrep.getId();
UserResource urs = usersRessource.get(userId);
urs.executeActionsEmail("myclientid","http://localhost:8080/team/",Arrays.asList("UPDATE_PASSWORD", "VERIFY_EMAIL", "UPDATE_PROFILE"));
以上代码引发异常
javax.ws.rs.BadRequestException: HTTP 400 Bad Request
at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.handleErrorStatus(ClientInvocation.java:219) ~[resteasy-client-3.9.1.Final.jar:3.9.1.Final]
at org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.DefaultEntityExtractorFactory$3.extractEntity(DefaultEntityExtractorFactory.java:50) ~[resteasy-client-3.9.1.Final.jar:3.9.1.Final]
at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invokeSync(ClientInvoker.java:151) ~[resteasy-client-3.9.1.Final.jar:3.9.1.Final]
at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:112) ~[resteasy-client-3.9.1.Final.jar:3.9.1.Final]
at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:76) ~[resteasy-client-3.9.1.Final.jar:3.9.1.Final]
at com.sun.proxy.$Proxy173.executeActionsEmail(Unknown Source) ~[na:na]
Spring Boot
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.7.RELEASE</version>
</parent>
keydepot管理客户端
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-admin-client</artifactId>
<version>10.0.1</version>
</dependency>
代码的第二部分有问题吗?在下面的问题中,所有场景都存在异常,但在我的例子中,当我传递clientid和redirecturi时异常抛出。
key斗篷java管理客户端在触发验证电子邮件时返回400错误
任何帮助都会很有帮助!
暂无答案!
目前还没有任何答案,快来回答吧!