Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

提供URL级别的访问保护 #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

提供URL级别的访问保护 #12

wants to merge 1 commit into from

Conversation

Kirhhoff
Copy link
Member

因为只需要一个Admin
所以我干了。。。
我把那个WeChatProperties类单独摘出来放成了一个类,
除了登陆账号、密码我还添加了。。
--loginURL
Login界面的URL
--loginSuccess
登陆成功以后的默认跳转页面,可以被覆盖
--loginError
登陆失败的跳转页面
--logoutURL
登出的页面

这些我全加到了WeChatProperties类的成员里面
所以还需要在we-chat的属性里面再加上这几个URL
我设成了NotNull
总之,如果只需要一个admin,应该只改application配置文件就可以了

因为只需要一个Admin
所以我干了。。。
我把那个WeChatProperties类单独摘出来放成了一个类,
除了登陆账号、密码我还添加了。。
--loginURL
	Login界面的URL
--loginSuccess
	登陆成功以后的默认跳转页面,可以被覆盖
--loginError
	登陆失败的跳转页面
--logoutURL
	登出的页面

这些我全加到了WeChatProperties类的成员里面
所以还需要在we-chat的属性里面再加上这几个URL
我设成了NotNull
总之,如果只需要一个admin,应该只改application配置文件就可以了
@huww98
Copy link
Member

huww98 commented Dec 16, 2018

年代有些久远了。。

首先thymeleaf和我们没啥关系把,为啥要依赖它?spring boot项目的话,应该可以直接依赖spring boot弄好的spring-boot-starter-security吧。

另外,WeChatProperties里的appId 和 secret是用来和微信的服务器做认证用的呀,不是管理员的用户名和密码。

@huww98
Copy link
Member

huww98 commented Dec 16, 2018

如果直接用它的这个登录机制的话,那登录信息应该是写在cookie里的吧?那可不能把csrf给禁用了呀。。要么想个办法让csrf和jwt共存,要么就管理员登录也用jwt?

Copy link
Member

@huww98 huww98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如上

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants