File tree Expand file tree Collapse file tree
java/io/github/simpleauth0/openapi Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ jar {
2+ archiveBaseName = ' simpleauth0-openapi'
3+ archiveVersion = version
4+ archiveExtension = ' jar'
5+ }
6+
7+ dependencies {
8+ api libraries. springdocOpenAPI
9+ }
Original file line number Diff line number Diff line change 1+ package io .github .simpleauth0 .openapi ;
2+
3+ import io .swagger .v3 .oas .models .OpenAPI ;
4+ import io .swagger .v3 .oas .models .info .Contact ;
5+ import io .swagger .v3 .oas .models .info .Info ;
6+ import io .swagger .v3 .oas .models .info .License ;
7+ import org .springframework .context .annotation .Bean ;
8+ import org .springframework .context .annotation .Configuration ;
9+
10+ /**
11+ * @author: ReLive27
12+ * @date: 2025/7/27 22:42
13+ */
14+ @ Configuration
15+ public class OpenApiConfiguration {
16+
17+ @ Bean
18+ public OpenAPI customOpenAPI () {
19+ return new OpenAPI ()
20+ .info (new Info ()
21+ .title ("SimpleAuth0 身份与访问管理 API 文档" )
22+ .version ("v1" )
23+ .description (
24+ "**SimpleAuth0** 是一个开源的身份与访问管理(IAM)平台," +
25+ "致力于为开发者提供安全、灵活、易集成的认证与授权解决方案。\n \n " +
26+ "主要功能包括:\n " +
27+ "- 支持多种身份认证协议(OAuth 2.0、OIDC、SAML、LDAP 等)\n " +
28+ "- 提供统一的用户认证与单点登录(SSO)\n " +
29+ "- 支持多因素认证(MFA)与细粒度访问控制\n " +
30+ "- 丰富的审计与安全日志功能\n \n " +
31+ "本文档提供 SimpleAuth0 服务端的 RESTful API 接口说明," +
32+ "便于开发者集成、定制与二次开发。"
33+ )
34+ .contact (new Contact ()
35+ .name ("SimpleAuth0 开发团队" )
36+ .url ("https://github.com/SimpleAuth0" )
37+ .email ("support@simpleauth0.io" ))
38+ .license (new License ()
39+ .name ("MIT License" )
40+ .url ("https://opensource.org/licenses/MIT" ))
41+ );
42+ }
43+
44+
45+ }
Original file line number Diff line number Diff line change 1+ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
2+ io.github.simpleauth0.openapi.OpenApiConfiguration
Original file line number Diff line number Diff line change @@ -8,5 +8,6 @@ dependencies {
88 implementation project(' :simpleauth0-core' )
99 implementation project(' :simpleauth0-security' )
1010 implementation project(' :simpleauth0-repository' )
11+ implementation project(' :simpleauth0-openapi' )
1112 implementation libraries. springBootStarterWeb
1213}
Original file line number Diff line number Diff line change @@ -4,3 +4,11 @@ simpleauth0:
44 token :
55 opaque :
66 format : base64
7+
8+ springdoc :
9+ api-docs :
10+ path : /v3/api-docs
11+ enabled : ${OPENAPI_ENABLE:true}
12+ swagger-ui :
13+ path : /swagger-ui/index.html
14+ enabled : ${OPENAPI_ENABLE:true}
Original file line number Diff line number Diff line change @@ -23,10 +23,6 @@ include (':server')
2323project(' :server' ). projectDir = file(' server' )
2424project(' :server' ). name = ' simpleauth0-server'
2525
26- include (' :extensions' )
27- project(' :extensions' ). projectDir = file(' extensions' )
28- project(' :extensions' ). name = ' simpleauth0-extensions'
29-
3026include (' :audit' )
3127project(' :audit' ). projectDir = file(' audit' )
3228project(' :audit' ). name = ' simpleauth0-audit'
@@ -46,3 +42,8 @@ project(':repository').name = 'simpleauth0-repository'
4642include(' :security' )
4743project(' :security' ). projectDir = file(' security' )
4844project(' :security' ). name = ' simpleauth0-security'
45+
46+ include(' :openapi' )
47+ project(' :openapi' ). projectDir = file(' extensions/openapi' )
48+ project(' :openapi' ). name = ' simpleauth0-openapi'
49+
You can’t perform that action at this time.
0 commit comments