上下文:使用https://www.keycloak.org/作为身份验证提供程序。
我有一个用例,我需要根据登录页面中查询字符串参数的值呈现 HTML 块。该值将来自与此类似的登录 URL:
http://localhost:8080/auth/realms/default/protocol/openid-connect/auth?...&customvar=1
Run Code Online (Sandbox Code Playgroud)
我想customvar有空login.ftl来完成我的目标。到目前为止,我已经尝试从客户端 bean 中检索 baseUrl,但它不可用,当我尝试访问 baseUrl 时应用程序崩溃。我还尝试访问 中的请求 url ${url},但它也不可用。
在此先感谢您的帮助。
我想与多个GraphQL类型共享一个nodeInterface.目前收到此错误:
Error: User may only implement Interface types, it cannot implement: undefined.
Run Code Online (Sandbox Code Playgroud)
我已经声明了这样的界面:
// file: node-interface.js
let {nodeInterface, nodeField} = nodeDefinitions(
(globalId) => {
let {type, id} = fromGlobalId(globalId);
if (type === 'UserModel') {;
return UserModel.findOne(id).exec();
}
return null;
},
(obj) => {
if (obj instanceof UserModel) {
return UserType;
}
return null;
}
);
export { nodeInterface };
export { nodeField };
and attempting to use it in my UserType like this
// file: user.js
import {
nodeInterface
} …Run Code Online (Sandbox Code Playgroud)