基于 Spring Security OAuth 的统一账号管理平台

Overview

基于 Spring Security OAuth 的统一账号管理平台

preview

前后端演示地址: https://tao.flizi.cn

  • 支持密码模式演示
    • 输入账号 123456, 密码: 123456, 以及验证码后点击登录
  • 支持授权登录演示
    • 输入手机号 123456, 密码: 123456, 以及验证码后点击登录
    • 或使用微信登录(默认会自动创建账号)
    • 或先注册用户,再进行登录

注意!!: 这里将手机号作为用户账号使用

功能

  • OAuth2 密码登录(扩展支持图形验证码) (开发完成)
  • OAuth2 授权码登录 (开发完成)
  • OAuth2 刷新TOKEN (开发完成)
  • OAuth2 社区登录(自定义授权模式) (开发完成)
    • 微信公众平台(公众号)登录 (开发完成)
    • 微信开发平台登录 (开发完成)
    • 短信登录 (开发完成)

文档

技术栈:

  • Spring Boot
  • Spring Security
  • Spring Security OAuth2
  • Mybatis

环境依赖:

  • JRE1.8
  • Mysql5.7

配置说明

  • 配置数据库
spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    username: root
    password: root
    url: jdbc:mysql://127.0.0.1:3306/auth?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
  • 配置微信登录

公众平台用于在微信内置浏览器打开时登录

开放平台用于在非微信环境下扫码登录

social:
  wx-mp: # 微信公众平台
    key: xxxx
    secret: xxx
  wx-open: # 微信开放平台
    key: xxxx
    secret: xxx
  • 配置图形验证码
captcha:
  enable: true # 启用
  base-str: '0123' #  随机字符
  length: 4  #  长度
  • 配置手机验证码(腾讯云)
sms:
  enable: true # 启用
  secretId: 'xxxx'
  secretKey: 'xxxx'
  appId: 'xxx'
  sign: 'xxx'
  templateId: 'xxx'
  • 页面配置
baseinfo:
  title: 浙江xxxx科技 # 标题
  beian: 浙ICP备xxxx号 # 备案号

编译 & 部署

mvn package && java -jar auth-0.0.1.jar
You might also like...

Rate limiting private REST APIs using Java Spring-boot, spring-security and bucket4j

Rate limiting REST APIs using Spring-security filter and Bucket4J Deployed Application (Swagger-ui on heroku) Inspired from: Baeldung Article Applicat

Jul 18, 2022

Zitadel.ch Example Project with Spring Boot and Spring Security

Zitadel.ch Example Project with Spring Boot and Spring Security

Zitadel Example Project with Spring Boot and Spring Security This example contains two Spring Boot Apps (app and api) which use the Zitadel IdP as Ope

May 3, 2022

一个小而美的低代码全栈开发平台,一键生成后端api接口+前端页面代码+在线接口文档,节省50%的前后端开发的工作量。基于springboot +mybatis+spring security+vue 技术栈

YOMA [toc] 一个小而美的低代码全栈开发平台,一键生成后端api接口+前端页面代码+在线接口文档,节省50%的前后端开发的工作量,平台代码100%开源。平台适用于企业信息化、政务、中小型互联网等项目 平台采用前后端分离架构,基于如下流行的开源框架,易上手+便于后期维护 后端:https://

Dec 9, 2022

🦄 开源社区系统:基于 SpringBoot + MyBatis + MySQL + Redis + Kafka + Elasticsearch + Spring Security + ... 并提供详细的开发文档和配套教程。包含帖子、评论、私信、系统通知、点赞、关注、搜索、用户设置、数据统计等模块。

🦄 开源社区系统:基于 SpringBoot + MyBatis + MySQL + Redis + Kafka + Elasticsearch + Spring Security + ... 并提供详细的开发文档和配套教程。包含帖子、评论、私信、系统通知、点赞、关注、搜索、用户设置、数据统计等模块。

Echo — 开源社区系统 项目上线到服务器之后可能会出现各种各样的 BUG,比如 Elasticsearch 服务启动失败导致搜索模块不可用,但是在本地运行是完全没问题的,所以各位小伙伴可以放心下载部署。 📚 项目简介 Echo 是一套前后端不分离的开源社区系统,基于目前主流 Java Web

Jan 7, 2023

基于SpringBoot,Spring Security,JWT,Vue & Element 的前后端分离权限管理系统

基于SpringBoot,Spring Security,JWT,Vue & Element 的前后端分离权限管理系统

平台简介 芋道,一套全部开源的企业级的快速开发平台,毫无保留给个人及企业免费使用。 有任何问题,或者想要的功能,可以在 Issues 中提给艿艿。 前端采用 vue-element-admin。 后端采用 Spring Boot、MySQL、Redis。 权限认证使用 Spring Security

Jan 1, 2023

【多模块微服务脚手架平台——Ancba】前后端分离架构SpringBoot 2.x、SpringCloud、SpringAdmin、Spring Security、Mybatis-plus、(Shiro)、JWT、Feign、Nacos、Knif4j等。

【多模块微服务脚手架平台——Ancba】前后端分离架构SpringBoot 2.x、SpringCloud、SpringAdmin、Spring Security、Mybatis-plus、(Shiro)、JWT、Feign、Nacos、Knif4j等。

Ancba 打造Blog.Core项目的SpringBoot微服务版,但是更强大 👏 Ancba (Another New CLI By Alacrity) 另一个全新的敏捷脚手架(单体/模块化/微服务都可支持)。 核心知识点与进度 📣 在 ..../resources/application-

Nov 29, 2022

Projeto Base - Spring Security - Blog Pessoal

Implementando a Camada de Segurança com o Spring Security no Blog Pessoal Nesta atividade iremos implementar a camada de segurança da aplicação com o

Aug 9, 2021

Spring Security 5.5 From Taxi To Takeoff

Spring Security 5.5 From Taxi to Takeoff This repository is for the SpringOne 2021 presentation titled "Spring Security 5.5 From Taxi to Takeoff". It

Nov 11, 2022

A Spring Security based Authentication microservice with MySQL

Spring Security Microservice using JWT and MySQL Background This is an open source, production-ready application that provides role-based user authent

Sep 28, 2021
Owner
知一
世界很大,我要出来走走。
知一
Spring Boot OAuth 2.0 Client Implementation + MySQL Integration

Spring Boot OAuth 2.0 Client + MySQL 1. What is OAuth 2.0 ? The OAuth 2.0 authorization framework enables a third-party application to obtain limited

Salah Eddine Zemmouri 8 May 12, 2022
参考 DDD/Clean Architecture 设计理念,整合 Spring Boot/Spring Security/Mybatis Plus/Vavr 的 Spring Realworld 应用案例

Demo · 更多项目 · 参考资料 ms-spring-ddd-examples Unified Domain-driven Layered Architecture for MicroService Apps,试图探索一套切实可行的应用架构规范,可以复制、可以理解、可以落地、可以控制复杂性的指导

王下邀月熊 19 Sep 23, 2022
Spring Boot & MongoDB Login and Registration example with JWT, Spring Security, Spring Data MongoDB

Spring Boot Login and Registration example with MongoDB Build a Spring Boot Auth with HttpOnly Cookie, JWT, Spring Security and Spring Data MongoDB. Y

null 15 Dec 30, 2022
Spring Boot Login and Registration example with MySQL, JWT, Rest Api - Spring Boot Spring Security Login example

Spring Boot Login example with Spring Security, MySQL and JWT Appropriate Flow for User Login and Registration with JWT Spring Boot Rest Api Architect

null 58 Jan 5, 2023
Spring Boot JWT Authentication example with Spring Security & Spring Data JPA

Spring Boot JWT Authentication example with Spring Security & Spring Data JPA

null 1 Jan 26, 2022
Zero-Dependency RFC 8252 OAuth 2.0 Authorization Flow

Tiny OAuth2 Client This is a minimal zero-dependency implementation of the RFC 8252 OAuth 2.0 for Native Apps, relying on Loopback Interface Redirecti

Coffee Libs ☕️ 4 Jun 17, 2022
The in-game login system for Grasscutter is based on oauth and GCAuth.

GCAuth OAuth The in-game login system for Grasscutter is based on oauth and GCAuth. Current Features: Use Twitter oauth to login Custom pages Importan

Xtao-Team 36 Nov 14, 2022
Kafdrop configured for Openshift, with OAuth proxy

Deploying Kafdrop to Openshift This repo takes the original Kafdrop and extends it to deploy it on Openshift. Integration with Kafka Clusters managed

Justin Davis 2 Jul 17, 2022
The in-game login system for Grasscutter is based on oauth and GCAuth.

GCAuth OAuth The in-game login system for Grasscutter is based on oauth and GCAuth. Current Features: Use Twitter oauth to login Custom pages Importan

Xtao-Labs 29 Aug 3, 2022
A fast, light and cloud native OAuth 2.0 authorization microservices based on light-4j

A fast, light weight and cloud native OAuth 2.0 Server based on microservices architecture built on top of light-4j and light-rest-4j frameworks. Stac

null 291 Dec 17, 2022