小编wil*_*pez的帖子

Keycloak:使查询字符串参数在标记 FreeMarker 模板中可用

上下文:使用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},但它也不可用。

在此先感谢您的帮助。

java freemarker keycloak

5
推荐指数
1
解决办法
774
查看次数

共享中继nodeInterface

我想与多个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)

graphql graphql-js relayjs

2
推荐指数
1
解决办法
801
查看次数

标签 统计

freemarker ×1

graphql ×1

graphql-js ×1

java ×1

keycloak ×1

relayjs ×1