Spring Security + Vaadin:如何创建自定义的非 JSP 登录表单? [英] Spring Security + Vaadin: How to create custom non-JSP login form?

查看:29
本文介绍了Spring Security + Vaadin:如何创建自定义的非 JSP 登录表单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Spring Security 中使用自定义 JSP 登录页面相当容易.我们的应用程序是基于 Vaadin 的,我不想有 JSP 登录页面.我想要的是创建为 Vaadin 小部件的自定义花式登录窗口.

It's fairly easy to use custom JSP login page in Spring Security. Our application is based on Vaadin though and I don't want to have JSP login page. What I want is custom fancy login window created as Vaadin widget.

从技术上讲,我可以使用 Vaadin 的 FormLayout 和名称字段,例如 j_usernamej_password ...但这是 Java 类而不是 JSP 文件,那么我在 http Spring Security 元素中指定了什么?我的意思是:

Well technically I can use Vaadin's FormLayout and name fields like j_username and j_password ... but this is Java class and not JSP file, so what do I specify in http Spring Security element? I mean:

<http auto-config='true'>
    <intercept-url pattern="/**" access="ROLE_USER" />
    <form-login login-page='MyLoginWindow.java or what?' />
</http>

推荐答案

我完全不熟悉 Spring Security,但我们 Vaadin 的一个人几年前制作了一个演示应用程序 https://github.com/peholmst/SpringSecurityDemo.我不知道它是否仍然是最新的,或者它是否能回答你的问题,但也许你可以自己看看,看看你是否能从那里得到任何答案.否则,您或许可以亲自 ping Petter,看看他是否对这个话题有任何新想法.

I'm totally unfamiliar with Spring Security, but one of our guys at Vaadin made a demo application a couple of years ago https://github.com/peholmst/SpringSecurityDemo. I don't know if it's still up-to-date or if it even answers your question, but perhaps you could have a look and see for yourself if you can get any answers from there. Otherwise you could perhaps ping Petter personally and see if he has any fresh ideas about the topic.

这篇关于Spring Security + Vaadin:如何创建自定义的非 JSP 登录表单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆