我想知道如何在 keycloak 登录页面上添加“返回应用程序”链接。我正在使用反应前端,当我使用 keycloak.login() 方法时,我将访问我的 keycloak 服务器。在这里,我想添加通过 keycloak 登录方法发送的redirectUri 返回到我的应用程序的可能性。
我在领域管理中没有找到任何选项,并且我创建了一个自定义主题,但没有获取用于访问redirectUri 链接的属性名称。
谢谢亚瑟
我在Angular Material 2中创建了自定义主题,现在我想使用自定义主题更改默认的主体背景颜色.我认为可以通过在theming.scss文件中使用此映射对象来更改/覆盖它:
$mat-light-theme-background: (
status-bar: map_get($mat-grey, 300),
app-bar: map_get($mat-grey, 100),
background: map_get($mat-grey, 50), //To override this property
hover: rgba(black, 0.04), // TODO(kara): check style with Material Design UX
card: white,
dialog: white,
disabled-button: $black-12-opacity,
raised-button: white,
focused-button: $black-6-opacity,
selected-button: map_get($mat-grey, 300),
selected-disabled-button: map_get($mat-grey, 400),
disabled-button-toggle: map_get($mat-grey, 200),
unselected-chip: map_get($mat-grey, 300),
disabled-list-option: map_get($mat-grey, 200),
);
Run Code Online (Sandbox Code Playgroud)
但是如何background从我的自定义主题更改此属性?这是我的自定义主题文件中的内容:
@import '~@angular/material/theming';
$typography: mat-typography-config( $font-family: 'Roboto, sans-serif', $body-1: mat-typography-level(13px, 18px, 400) );
@include mat-core($typography);
$primary: mat-palette($mat-indigo);
$accent: mat-palette($mat-pink, A200, A100, …Run Code Online (Sandbox Code Playgroud) 因此,我使用 keycloak 作为身份验证机制,并通过修改 login.ftl 文件来自定义登录页面。到目前为止,一切都很好。我正在我的 login.ftl 中导入 template.ftl 文件 - 按照 keycloak 文档的指示 - 到目前为止一切顺利。在该 template.ftl 文件中 - 有一种方法可以访问错误消息,如下所示
<#if displayMessage && message?has_content && (message.type != 'warning' || !isAppInitiatedAction??)>
<div class="alert alert-${message.type}">
<#if message.type = 'success'><span class="${properties.kcFeedbackSuccessIcon!}"></span></#if>
<#if message.type = 'warning'><span class="${properties.kcFeedbackWarningIcon!}"></span></#if>
<#if message.type = 'error'><span class="${properties.kcFeedbackErrorIcon!}"></span></#if>
<#if message.type = 'info'><span class="${properties.kcFeedbackInfoIcon!}"></span></#if>
<span class="kc-feedback-text">${kcSanitize(message.summary)?no_esc}</span>
</div>
</#if>
Run Code Online (Sandbox Code Playgroud)
太好了!如果我不想处理 template.ftl 文件中的错误消息 ui 怎么办?我在login.ftl 页面上有一个表单UI,我想在其中显示错误消息。如何将该消息传递到login.ftl 文件或从login.ftl 文件访问该错误消息?预先感谢您的任何指导。
freemarker keycloak custom-theme keycloak-services error-messaging
我已经添加了自定义主题文件,并且希望在整个站点上减小字体大小。我不知道如何通过自定义主题更改字体大小,因为没有适当的文档。
@import '~@angular/material/theming';
// Plus imports for other components in your app.
// Include the common styles for Angular Material. We include this here so that you only
// have to load a single css file for Angular Material in your app.
// Be sure that you only ever include this mixin once!
@include mat-core();
// Define the palettes for your theme using the Material Design palettes available in palette.scss
// (imported above). For each palette, you can optionally specify …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用自定义主题修改 Keycloak 主题的登录页面。home.js我需要重用使用react和' 设计的主页设计 ( ) {Component}。
有没有可能的方法将此 js 文件或component驻留在另一个 js 文件中的任何其他反应导入到我的自定义主题的login.ftlKeycloak 文件中?
custom-theme ×5
keycloak ×3
angular ×2
reactjs ×2
freemarker ×1
html ×1
javascript ×1
login-page ×1
sass ×1