本文档讲述内容与代码示例可参见 Shoulder-Demo3 |
登录认证
OAuth 2.0 & SAML 2.0 & 单点登陆 CAS
详情参见 Spring-Security_认证
更多认证方式(JAAS、X509…)
详情参见 Spring-Security_认证
验证码
在使用前需要引入
Maven
<dependency>
<groupId>cn.itlym</groupId>
<artifactId>shoulder-starter-security-code</artifactId>
<version>0.8.1<version>
</dependency>
Gradle
compile 'cn.itlym:shoulder-starter-security-code:0.8.1'
无需开发,只需要修改对应配置
YAML
shoulder:
security:
validate-code:
# 如 sms、email、image、invitation,这里以 sms 为例
sms:
length: 6
effective-seconds: 10min
parameterName: 'code'
urls:
- '/api/user/register'
- '/api/user/changePwd'
HTTP 接口防护:CSRF、Header、Request
详情参见 Spring-Security_接口防护