kawhii / sso

cas单点登录系统,其中包括cas认证服务,配置中心,监控平台,服务管理的高可用项目
https://kawhii.github.io/sso
MIT License
937 stars 428 forks source link

自定义登录器验证器 #2

Closed kawhii closed 7 years ago

kawhii commented 7 years ago
kawhii commented 7 years ago

AuthenticationHandler https://apereo.github.io/cas/development/installation/Configuring-Custom-Authentication.html

kawhii commented 7 years ago

通过访问https://passport.sso.com:8443/cas/login?service=http%3A%2F%2Flocalhost%3A8083%2Fcallback%3Fclient_name%3Dcas 输入admin 系统为SSO即可登录


核心模块为sso-support/sso-support-custom-auth

实现

  1. 覆盖defaultWebflowConfigurer(CasWebflowConfigurer) 注册自定义流程
  2. 重写createRememberMeAuthnWebflowConfig把自定义的Credential绑定到credential
  3. viewLoginForm添加绑定属性
  4. 添加自定义人认证器AuthenticationHandler
  5. 注册自定义认证器并且设置order
  6. 依赖jar包(插拔)