Skip to content

benfromchina/oauth2-spring-boot-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

目录

功能

  • 实现认证中心
  • 实现资源中心

必要配置

引入依赖

<dependency>
    <groupId>io.github.benfromchina</groupId>
    <artifactId>oauth2-spring-boot-starter</artifactId>
    <version>1.0.0</version>
</dependency>

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
  • 用户接口org.springframework.security.core.userdetails.UserDetailsService

可扩展接口

  • 鉴权接口com.stark.oauth2.service.RbacService
  • 用户权限接口com.stark.oauth2.service.PermissionService
  • 无需校验的请求接口com.stark.oauth2.service.UriPermitAllService

About

单体应用中,同时实现基于 oauth2+jwt 的认证中心和资源中心

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages