security

基于Spring Security体系安全模块 包括: APP环境(Spring Security、Spring Social社交登陆、token验证) WEB环境下(Spring Security、Spring Social社交登陆), 验证码验证(图形、短信)

License

License

Categories

Categories

Security
GroupId

GroupId

com.github.shawven
ArtifactId

ArtifactId

security
Last Version

Last Version

2.1.0
Release Date

Release Date

Type

Type

pom
Description

Description

security
基于Spring Security体系安全模块 包括: APP环境(Spring Security、Spring Social社交登陆、token验证) WEB环境下(Spring Security、Spring Social社交登陆), 验证码验证(图形、短信)
Project URL

Project URL

https://github.com/shawven/security
Source Code Management

Source Code Management

https://github.com/shawven/security

Download security

Filename Size
security-2.1.0.pom 5 KB
Browse

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.shawven/security/ -->
<dependency>
    <groupId>com.github.shawven</groupId>
    <artifactId>security</artifactId>
    <version>2.1.0</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/com.github.shawven/security/
implementation 'com.github.shawven:security:2.1.0'
// https://jarcasting.com/artifacts/com.github.shawven/security/
implementation ("com.github.shawven:security:2.1.0")
'com.github.shawven:security:pom:2.1.0'
<dependency org="com.github.shawven" name="security" rev="2.1.0">
  <artifact name="security" type="pom" />
</dependency>
@Grapes(
@Grab(group='com.github.shawven', module='security', version='2.1.0')
)
libraryDependencies += "com.github.shawven" % "security" % "2.1.0"
[com.github.shawven/security "2.1.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • security-app
  • security-app-spring-boot-starter
  • security-browser
  • security-browser-spring-boot-starter
  • security-connect
  • security-connect-autoconfigure
  • security-oauth2
  • security-oauth2-autoconfigure
  • security-authorization
  • security-authorization-autoconfigure
  • security-verification
  • security-verification-spring-boot-starter

Security

只需要简单的配置就能接入OAuth2授权认证流程、短信登录、第三方登录等功能

spring-securiy

  • 基于Spring Security开发,更多信息请参考官方文档
  • 提供浏览器和APP环境spring-boot-starter支持,分别以session 和 token认保存会话
  • 支持表单登陆、短信登录、OAuth2授权登录、第三方登录(微信、QQ)

自动配置

spring-boot-starter支持,配置属性即可成功使用

security-app-spring-boot-starter

app环境支持,单独包

security-browser-spring-boot-starter

浏览器环境支持,单独包

security-verification-spring-boot-starter

短信、验证码模块,单独包/自动配置包

security-oauth2-autoconfigure

OAuth2自动配置包,

security-connect-autoconfigure

第三方登录自动配置,Spring Social社交登陆支持,在APP环境下APP拿到token,请求登录接口登录

按需加载

当引入了 app 或者 browser 主包时

  • 加载security-verification-spring-boot-starter 具备短信登录、发送短信、图形验证码功能
  • 加载security-oauth2-autoconfigure 具备token登录功能
  • 加载security-connect-autoconfigure 具备第三方登录功能
  • 只要加载security-oauth2-autoconfigure 则,第三方登录和短信登录无缝兼容OAuth2 Token方式

各模块智适应主要依赖AuthenticationSuccessHandler来处理是浏览器跳转、JSON响应、还是返回token

browser环境 -- 会话保持主要依赖session,支持传统页面跳转,和前后端分离json响应 App环境 -- 无状态,会话主要存储依赖redis,仅支持json响应

License

Security is Open Source software released under the Apache 2.0 license.

Versions

Version
2.1.0
2.0.7
2.0.6
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
1.0.0