Commit 71126ae0 authored by 高洋's avatar 高洋

Track 20 files into repository.

- untracked .gitignore
- removed assets/后端开发/.gitignore
- removed assets/后端开发/activiti-helper.md
- removed assets/后端开发/activiti.md
- removed assets/后端开发/activiti_demo.md
- removed assets/后端开发/activiti_editor_helper.md
- removed assets/后端开发/deployment.md
- removed assets/后端开发/RabbitMq消息队列.md
- removed assets/后端开发/README.md
- removed assets/后端开发/redis.md
- removed sso-describe.md
- untracked 后端开发/activiti-helper.md
- untracked 后端开发/activiti.md
- untracked 后端开发/activiti_demo.md
- untracked 后端开发/activiti_editor_helper.md
- untracked 后端开发/deployment.md
- untracked 后端开发/RabbitMq消息队列.md
- untracked 后端开发/README.md
- untracked 后端开发/redis.md
- modified 融租易开发手册.md

Auto commit by GitBook Editor
parent dff7da34
# 单点登录
融租易目前支持单点登录成功后,可以跳转至登录前的URL。
> 注意系统管理-系统配置页面的配置项---登录成功跳转URL。默认设置为/index,则可以自动跳转至登录前的URL,如果改为自定义的其他页面,则会带上?targetUrl=xxx参数先跳转至系统配置的URL,可自行处理跳转。
可以配置CAS和标准登录并存,默认登录页面为SSO登录页面,访问/login,则可以进入标准登录页面。可以参照如下配置:
修改spring/casSecurity.xml
1.添加用于标准登录的相关bean
```xml
<beans:bean id="loginFailureHandler" class="com.hand.hap.security.LoginFailureHandler"/>
<beans:bean id="captchaVerifierFilter" class="com.hand.hap.security.CaptchaVerifierFilter"> <beans:property name="captchaField" value="verifiCode"/></beans:bean>
```
2.修改认证配置
```xml
<!-- CAS 认证配置 -->
<http entry-point-ref="casEntryPoint" access-decision-manager-ref="accessDecisionManager" >
<csrf disabled="true"/>
<intercept-url pattern="/resources/**" access="permitAll" />
<intercept-url pattern="/lib/**" access="permitAll" />
<intercept-url pattern="/common/**" access="permitAll" />
<intercept-url pattern="/login" access="permitAll" /> <intercept-url pattern="/verifiCode" access="permitAll" />
<intercept-url pattern="/login.html" access="permitAll" />
<intercept-url pattern="/**" access="hasRole('ROLE_USER')" /> <form-login login-page='/login' authentication-success-handler-ref="successHandler" authentication-failure-handler-ref="loginFailureHandler"/>
<!-- 验证码拦截器 -->
<custom-filter ref="captchaVerifierFilter" before="FORM_LOGIN_FILTER"/> <custom-filter ref="requestSingleLogoutFilter" before="LOGOUT_FILTER"/>
<custom-filter position="CAS_FILTER" ref="casFilter" />
<custom-filter ref="singleLogoutFilter" before="CAS_FILTER"/>
<headers defaults-disabled="true">
<cache-control/>
</headers>
</http>
```
3.添加authentication-provider
```xml
<authentication-manager alias="authenticationManager">
<authentication-provider ref="casAuthenticationProvider"/>
<authentication-provider user-service-ref="customUserDetailsService">
<password-encoder ref="passwordManager"/>
</authentication-provider>
</authentication-manager>
```
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
* 2.3 Checkstyle * 2.3 Checkstyle
* III. 后端开发 * III. 后端开发
* [3.1 单点登录](/sso-describe.md)
* IV. 前端JavaScript开发 * IV. 前端JavaScript开发
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment