# oauth2-spring-boot-starter **Repository Path**: jarvis-lib/oauth2-spring-boot-starter ## Basic Information - **Project Name**: oauth2-spring-boot-starter - **Description**: 单体应用中,同时实现基于 oauth2+jwt 的认证中心和资源中心。 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-09 - **Last Updated**: 2022-07-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: OAuth2, 认证中心, 资源中心, SpringBoot, 单体应用 ## README [![](https://img.shields.io/badge/maven%20central-v1.0.0-brightgreen)](https://search.maven.org/search?q=g:%22io.github.benfromchina%22%20AND%20a:%22oauth2-spring-boot-starter%22) [![](https://img.shields.io/badge/release-v1.0.0-blue)](https://gitee.com/jarvis-lib/oauth2-spring-boot-starter/releases/v1.0.0) [![](https://img.shields.io/badge/license-Apache--2.0-9cf)](https://www.apache.org/licenses/LICENSE-2.0.html) # 目录 - [功能](#功能) - [必要配置](#必要配置) - [引入依赖](#引入依赖) - [yml文件](#yml文件) - [实现接口](#实现接口) - [可扩展接口](#可扩展接口) # 功能 - 实现认证中心 - 实现资源中心 # 必要配置 ## 引入依赖 ```xml io.github.benfromchina oauth2-spring-boot-starter 1.0.0 ``` ## `yml`文件 ```yml security: oauth2: authorized-grant-types: authorization_code,password,refresh_token jwt: key-pair-file: jarvis.jks key-store-password: tony key-pair-alias: jarvis additional-information: company: stark ``` ## 实现接口 - 应用接口`org.springframework.security.oauth2.provider.ClientDetailsService`(加`@Primary`注解) - 用户接口`org.springframework.security.core.userdetails.UserDetailsService` # 可扩展接口 - 鉴权接口`com.stark.oauth2.service.RbacService` - 用户权限接口`com.stark.oauth2.service.PermissionService` - 无需校验的请求接口`com.stark.oauth2.service.UriPermitAllService`