Skip to content

Commit 83f0b95

Browse files
authored
Merge pull request #22 from Nasruddin/feature/authorization-server-impl
Commiting missing files
2 parents b8d6988 + 58a13c0 commit 83f0b95

File tree

21 files changed

+656
-0
lines changed

21 files changed

+656
-0
lines changed

.DS_Store

8 KB
Binary file not shown.

config-repo/auth-server.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
server.port: 9999
2+
server.forward-headers-strategy: framework

config-repo/eureka-server.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
server:
2+
port: 8761
3+
4+
eureka:
5+
instance:
6+
hostname: localhost
7+
client:
8+
registerWithEureka: false
9+
fetchRegistry: false
10+
serviceUrl:
11+
defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
12+
# from: https://github.com/spring-cloud-samples/eureka/blob/master/src/main/resources/application.yml
13+
server:
14+
waitTimeInMsWhenSyncEmpty: 0
15+
response-cache-update-interval-ms: 5000
16+
17+

config-repo/gateway.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
server.port: 8443
2+
test1.data: helloupdate
3+
logging:
4+
level:
5+
root: INFO
6+
org.springframework.cloud.gateway.route.RouteDefinitionRouteLocator: INFO
7+
org.springframework.cloud.gateway: TRACE
8+
org.springframework.web.server.adapter.HttpWebHandlerAdapter: TRACE
9+
10+
spring.cloud.gateway.routes:
11+
- id: course-composite
12+
uri: lb://course-composite
13+
predicates:
14+
- Path=/course-composite/**
15+
16+
- id: oauth2-server
17+
uri: lb://auth-server
18+
predicates:
19+
- Path=/oauth2/**
20+
21+
- id: oauth2-login
22+
uri: lb://auth-server
23+
predicates:
24+
- Path=/login/**
25+
26+
- id: oauth2-error
27+
uri: lb://auth-server
28+
predicates:
29+
- Path=/error/**
30+
31+
- id: course-composite-swagger-ui
32+
uri: lb://course-composite
33+
predicates:
34+
- Path=/openapi/**
35+
36+
- id: course-composite-swagger-ui-webjars
37+
uri: lb://course-composite
38+
predicates:
39+
- Path=/webjars/**
40+
41+
- id: eureka-api
42+
uri: http://${app.eureka-server}:8761
43+
predicates:
44+
- Path=/eureka/api/{segment}
45+
filters:
46+
- SetPath=/eureka/{segment}
47+
48+
- id: eureka-web-start
49+
uri: http://${app.eureka-server}:8761
50+
predicates:
51+
- Path=/eureka/web
52+
filters:
53+
- SetPath=/
54+
55+
- id: eureka-web-other
56+
uri: http://${app.eureka-server}:8761
57+
predicates:
58+
- Path=/eureka/**
59+
- id: config-server
60+
uri: ${spring.cloud.config.uri}
61+
predicates:
62+
- Path=/config/**
63+
filters:
64+
- RewritePath=/config/(?<segment>.*), /$\{segment}
65+
66+
spring.security.oauth2.resourceserver.jwt.issuer-uri: http://${app.auth-server}:9999
67+
68+
69+
management.endpoint.gateway.enabled: true
70+
management.endpoints.web.exposure.include: "*"
71+
72+
#server.ssl:
73+
# key-store-type: PKCS12
74+
# key-store: classpath:keystore/edge.p12
75+
# key-store-password: password
76+
# key-alias: localhost

spring-cloud/.DS_Store

6 KB
Binary file not shown.
Lines changed: 33 additions & 0 deletions
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/
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>org.springframework.boot</groupId>
7+
<artifactId>spring-boot-starter-parent</artifactId>
8+
<version>3.0.4</version>
9+
<relativePath/> <!-- lookup parent from repository -->
10+
</parent>
11+
<groupId>io.javatab</groupId>
12+
<artifactId>authorization-server</artifactId>
13+
<version>1.0.0</version>
14+
<name>authorization-server</name>
15+
<description>Demo project for Spring Boot</description>
16+
<properties>
17+
<java.version>17</java.version>
18+
<spring-cloud.version>2022.0.1</spring-cloud.version>
19+
</properties>
20+
<dependencies>
21+
<dependency>
22+
<groupId>org.springframework.boot</groupId>
23+
<artifactId>spring-boot-starter-web</artifactId>
24+
</dependency>
25+
<dependency>
26+
<groupId>org.springframework.security</groupId>
27+
<artifactId>spring-security-oauth2-authorization-server</artifactId>
28+
<version>1.0.0</version>
29+
</dependency>
30+
<dependency>
31+
<groupId>org.springframework.boot</groupId>
32+
<artifactId>spring-boot-starter-security</artifactId>
33+
</dependency>
34+
<dependency>
35+
<groupId>org.springframework.cloud</groupId>
36+
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
37+
</dependency>
38+
<dependency>
39+
<groupId>org.springframework.cloud</groupId>
40+
<artifactId>spring-cloud-starter-config</artifactId>
41+
</dependency>
42+
<dependency>
43+
<groupId>org.springframework.retry</groupId>
44+
<artifactId>spring-retry</artifactId>
45+
</dependency>
46+
<dependency>
47+
<groupId>org.springframework.boot</groupId>
48+
<artifactId>spring-boot-starter-actuator</artifactId>
49+
</dependency>
50+
51+
<dependency>
52+
<groupId>org.springframework.boot</groupId>
53+
<artifactId>spring-boot-starter-test</artifactId>
54+
<scope>test</scope>
55+
</dependency>
56+
<dependency>
57+
<groupId>org.springframework.security</groupId>
58+
<artifactId>spring-security-test</artifactId>
59+
<scope>test</scope>
60+
</dependency>
61+
</dependencies>
62+
63+
<dependencyManagement>
64+
<dependencies>
65+
<dependency>
66+
<groupId>org.springframework.cloud</groupId>
67+
<artifactId>spring-cloud-dependencies</artifactId>
68+
<version>${spring-cloud.version}</version>
69+
<type>pom</type>
70+
<scope>import</scope>
71+
</dependency>
72+
</dependencies>
73+
</dependencyManagement>
74+
75+
<build>
76+
<plugins>
77+
<plugin>
78+
<groupId>org.springframework.boot</groupId>
79+
<artifactId>spring-boot-maven-plugin</artifactId>
80+
</plugin>
81+
</plugins>
82+
</build>
83+
84+
</project>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package io.javatab.springcloud.auth;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
6+
@SpringBootApplication
7+
public class AuthorizationServerApplication {
8+
9+
public static void main(String[] args) {
10+
SpringApplication.run(AuthorizationServerApplication.class, args);
11+
}
12+
13+
}
Lines changed: 33 additions & 0 deletions
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/

spring-cloud/config-server/pom.xml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>org.springframework.boot</groupId>
7+
<artifactId>spring-boot-starter-parent</artifactId>
8+
<version>3.0.5</version>
9+
<relativePath/> <!-- lookup parent from repository -->
10+
</parent>
11+
<groupId>io.javatab</groupId>
12+
<artifactId>config-server</artifactId>
13+
<version>0.0.1-SNAPSHOT</version>
14+
<name>config-server</name>
15+
<description>Demo project for Spring Boot</description>
16+
<properties>
17+
<java.version>17</java.version>
18+
<spring-cloud.version>2022.0.1</spring-cloud.version>
19+
</properties>
20+
<dependencies>
21+
<dependency>
22+
<groupId>org.springframework.boot</groupId>
23+
<artifactId>spring-boot-starter-security</artifactId>
24+
</dependency>
25+
<dependency>
26+
<groupId>org.springframework.cloud</groupId>
27+
<artifactId>spring-cloud-config-server</artifactId>
28+
</dependency>
29+
30+
<dependency>
31+
<groupId>org.springframework.boot</groupId>
32+
<artifactId>spring-boot-starter-test</artifactId>
33+
<scope>test</scope>
34+
</dependency>
35+
<dependency>
36+
<groupId>org.springframework.security</groupId>
37+
<artifactId>spring-security-test</artifactId>
38+
<scope>test</scope>
39+
</dependency>
40+
</dependencies>
41+
<dependencyManagement>
42+
<dependencies>
43+
<dependency>
44+
<groupId>org.springframework.cloud</groupId>
45+
<artifactId>spring-cloud-dependencies</artifactId>
46+
<version>${spring-cloud.version}</version>
47+
<type>pom</type>
48+
<scope>import</scope>
49+
</dependency>
50+
</dependencies>
51+
</dependencyManagement>
52+
53+
<build>
54+
<plugins>
55+
<plugin>
56+
<groupId>org.springframework.boot</groupId>
57+
<artifactId>spring-boot-maven-plugin</artifactId>
58+
</plugin>
59+
</plugins>
60+
</build>
61+
62+
</project>

0 commit comments

Comments
 (0)