Skip to content

Commit 5e01c35

Browse files
committed
添加auth模块;
修改gitignore
1 parent 73d2459 commit 5e01c35

25 files changed

+1094
-70
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/mvnw text eol=lf
2+
*.cmd text eol=crlf

.gitignore

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
/target/
1+
HELP.md
2+
target/
23
!.mvn/wrapper/maven-wrapper.jar
3-
.DS_Store
4+
!**/src/main/**/target/
5+
!**/src/test/**/target/
46

57
### STS ###
68
.apt_generated
@@ -19,9 +21,13 @@
1921

2022
### NetBeans ###
2123
/nbproject/private/
22-
/build/
2324
/nbbuild/
2425
/dist/
2526
/nbdist/
2627
/.nb-gradle/
27-
/.github/
28+
build/
29+
!**/src/main/**/build/
30+
!**/src/test/**/build/
31+
32+
### VS Code ###
33+
.vscode/

.mvn/wrapper/maven-wrapper.properties

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#
2+
# Copyright 2018-2025 little3201.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
#
17+
wrapperVersion=3.3.2
18+
distributionType=only-script
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip

assets/.gitignore

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
/target/
1+
HELP.md
2+
target/
23
!.mvn/wrapper/maven-wrapper.jar
4+
!**/src/main/**/target/
5+
!**/src/test/**/target/
36

47
### STS ###
58
.apt_generated
@@ -18,8 +21,13 @@
1821

1922
### NetBeans ###
2023
/nbproject/private/
21-
/build/
2224
/nbbuild/
2325
/dist/
2426
/nbdist/
25-
/.nb-gradle/
27+
/.nb-gradle/
28+
build/
29+
!**/src/main/**/build/
30+
!**/src/test/**/build/
31+
32+
### VS Code ###
33+
.vscode/

assets/README.md

-22
This file was deleted.

assets/pom.xml

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
~ Copyright 2018-2024 little3201.
3+
~ Copyright 2018-2025 little3201.
44
~
55
~ Licensed under the Apache License, Version 2.0 (the "License");
66
~ you may not use this file except in compliance with the License.
@@ -56,10 +56,6 @@
5656
<groupId>io.micrometer</groupId>
5757
<artifactId>micrometer-registry-prometheus</artifactId>
5858
</dependency>
59-
<dependency>
60-
<groupId>com.github.ben-manes.caffeine</groupId>
61-
<artifactId>caffeine</artifactId>
62-
</dependency>
6359
<dependency>
6460
<groupId>org.springframework.boot</groupId>
6561
<artifactId>spring-boot-starter-oauth2-resource-server</artifactId>

assets/src/main/java/io/leafage/basic/assets/config/AuthorizationServerConfiguration.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2024 little3201.
2+
* Copyright 2018-2025 little3201.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -37,10 +37,11 @@ public class AuthorizationServerConfiguration {
3737

3838
@Bean
3939
SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
40-
http.authorizeExchange(exchanges -> exchanges
40+
http
41+
.authorizeExchange(exchanges -> exchanges
4142
.pathMatchers(HttpMethod.GET).permitAll()
4243
.anyExchange().authenticated())
43-
.oauth2ResourceServer(o -> o.jwt(Customizer.withDefaults()));
44+
.oauth2ResourceServer(oauth2 -> oauth2.jwt(Customizer.withDefaults()));
4445
return http.build();
4546
}
4647
}

auth/.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/mvnw text eol=lf
2+
*.cmd text eol=crlf

auth/.gitignore

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
HELP.md
2+
target/
3+
!../.mvn/wrapper/maven-wrapper.jar
4+
!**/src/main/**/target/
5+
!**/src/test/**/target/
6+
7+
### STS ###
8+
.apt_generated
9+
.classpath
10+
.factorypath
11+
.project
12+
.settings
13+
.springBeans
14+
.sts4-cache
15+
16+
### IntelliJ IDEA ###
17+
.idea
18+
*.iws
19+
*.iml
20+
*.ipr
21+
22+
### NetBeans ###
23+
/nbproject/private/
24+
/nbbuild/
25+
/dist/
26+
/nbdist/
27+
/.nb-gradle/
28+
build/
29+
!**/src/main/**/build/
30+
!**/src/test/**/build/
31+
32+
### VS Code ###
33+
.vscode/

auth/pom.xml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright 2018-2025 little3201.
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ https://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
~
17+
-->
18+
19+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
20+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
21+
<modelVersion>4.0.0</modelVersion>
22+
<parent>
23+
<groupId>io.leafage.basic</groupId>
24+
<artifactId>leafage-basic</artifactId>
25+
<version>0.1.0</version>
26+
<relativePath/> <!-- lookup parent from repository -->
27+
</parent>
28+
29+
<artifactId>auth</artifactId>
30+
<version>0.0.1-SNAPSHOT</version>
31+
32+
<name>auth</name>
33+
<description>auth of leafage</description>
34+
35+
<dependencies>
36+
<dependency>
37+
<groupId>org.springframework.boot</groupId>
38+
<artifactId>spring-boot-starter-actuator</artifactId>
39+
</dependency>
40+
<dependency>
41+
<groupId>org.springframework.boot</groupId>
42+
<artifactId>spring-boot-starter-jdbc</artifactId>
43+
</dependency>
44+
<dependency>
45+
<groupId>org.springframework.boot</groupId>
46+
<artifactId>spring-boot-starter-oauth2-authorization-server</artifactId>
47+
</dependency>
48+
<dependency>
49+
<groupId>org.postgresql</groupId>
50+
<artifactId>postgresql</artifactId>
51+
</dependency>
52+
<dependency>
53+
<groupId>io.micrometer</groupId>
54+
<artifactId>micrometer-registry-prometheus</artifactId>
55+
</dependency>
56+
<!-- test -->
57+
<dependency>
58+
<groupId>org.springframework.boot</groupId>
59+
<artifactId>spring-boot-starter-test</artifactId>
60+
<scope>test</scope>
61+
</dependency>
62+
</dependencies>
63+
64+
<build>
65+
<plugins>
66+
<plugin>
67+
<groupId>org.springframework.boot</groupId>
68+
<artifactId>spring-boot-maven-plugin</artifactId>
69+
</plugin>
70+
</plugins>
71+
</build>
72+
73+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* Copyright 2018-2025 little3201.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
package io.leafage.auth;
19+
20+
import org.springframework.boot.SpringApplication;
21+
import org.springframework.boot.autoconfigure.SpringBootApplication;
22+
23+
/**
24+
* auth application.
25+
*
26+
* @author wq li
27+
*/
28+
@SpringBootApplication
29+
public class AuthApplication {
30+
31+
public static void main(String[] args) {
32+
SpringApplication.run(AuthApplication.class, args);
33+
}
34+
35+
}

0 commit comments

Comments
 (0)