广告
返回顶部
首页 > 资讯 > 精选 >sso与spring security整合 预认证场景 PreAuthenticated
  • 216
分享到

sso与spring security整合 预认证场景 PreAuthenticated

2023-06-03 01:06:30 216人浏览 薄情痞子
摘要

当前项目的有个要求,sso与spring security结合使用2. 使用spring security的“预认证场景” PreAuthenticated参考文档Http://www.family168.com/tutorial/spr

当前项目的有个要求,sso与spring security结合使用
2. 使用spring security的“预认证场景” PreAuthenticated
参考文档
Http://www.family168.com/tutorial/springsecurity/html/springsecurity.html

下载spring security的源代码。参考3.5. Pre-Authentication例子
个例子演示了如何从pre-authentication框架绑定bean,从J2EE容器中获得有用的登录信息。 用户名和角色是由容器设置的。

代码在samples/preauth目录下。
主要需要重写的类
RequestHeaderAuthenticationFilter(sso认证跳入本应用系统后,首先到这个类进行用户权限加载和验证,
不一定所有sso用户都能访问本子系统)
UserLoginInterceptor(加载资源,像对具体的模块有一些什么样的具体的CRUD权限)

需要注意的点


public class User implements Serializable, UserDetails
public class UserDaoHibernate extends GenericDaoHibernate implements UserDao, AuthenticationUserDetailsService

springsecuritypreauth.zip

[@more@]

--结束END--

本文标题: sso与spring security整合 预认证场景 PreAuthenticated

本文链接: https://www.lsjlt.com/news/232008.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作