fans(@PathVariable("qq") String qq){
+ return InMemoryQQDatabase.database.get(qq).fans();
+ }
+
+
+
+}
diff --git a/authorization-code/qq/src/main/resources/application.yml b/authorization-code/qq/src/main/resources/application.yml
new file mode 100644
index 0000000..1a6d88a
--- /dev/null
+++ b/authorization-code/qq/src/main/resources/application.yml
@@ -0,0 +1,9 @@
+server:
+ port: 8080
+
+spring:
+ redis:
+ host: 127.0.0.1
+ database: 0
+
+logging.level.org.springframework.security: DEBUG
\ No newline at end of file
diff --git a/authorization-code/qq/src/main/resources/templates/hello.html b/authorization-code/qq/src/main/resources/templates/hello.html
new file mode 100644
index 0000000..46feef7
--- /dev/null
+++ b/authorization-code/qq/src/main/resources/templates/hello.html
@@ -0,0 +1,13 @@
+
+
+
+ Hello World!
+
+
+ Hello [[${#httpServletRequest.remoteUser}]]!
+
+
+
\ No newline at end of file
diff --git a/authorization-code/qq/src/main/resources/templates/home.html b/authorization-code/qq/src/main/resources/templates/home.html
new file mode 100644
index 0000000..fe4e8b3
--- /dev/null
+++ b/authorization-code/qq/src/main/resources/templates/home.html
@@ -0,0 +1,11 @@
+
+
+
+ Spring Security Example
+
+
+ Welcome!
+
+ Click here to see a greeting.
+
+
\ No newline at end of file
diff --git a/authorization-code/qq/src/main/resources/templates/login.html b/authorization-code/qq/src/main/resources/templates/login.html
new file mode 100644
index 0000000..a178531
--- /dev/null
+++ b/authorization-code/qq/src/main/resources/templates/login.html
@@ -0,0 +1,20 @@
+
+
+
+ Spring Security Example
+
+
+
+ Invalid username and password.
+
+
+ You have been logged out.
+
+
+
+
\ No newline at end of file
diff --git a/client-credentials-springboot2/.DS_Store b/client-credentials-springboot2/.DS_Store
new file mode 100644
index 0000000..5008ddf
Binary files /dev/null and b/client-credentials-springboot2/.DS_Store differ
diff --git a/client-credentials-springboot2/src/main/java/moe/cnkirito/security/oauth2/config/OAuth2ServerConfig.java b/client-credentials-springboot2/src/main/java/moe/cnkirito/security/oauth2/config/OAuth2ServerConfig.java
index 5397966..08959e4 100644
--- a/client-credentials-springboot2/src/main/java/moe/cnkirito/security/oauth2/config/OAuth2ServerConfig.java
+++ b/client-credentials-springboot2/src/main/java/moe/cnkirito/security/oauth2/config/OAuth2ServerConfig.java
@@ -93,8 +93,7 @@ public void configure(AuthorizationServerEndpointsConfigurer endpoints) {
@Override
public void configure(AuthorizationServerSecurityConfigurer oauthServer) {
//允许表单认证
- oauthServer.allowFormAuthenticationForClients()
- ;
+ oauthServer.allowFormAuthenticationForClients();
}
}
diff --git a/client-credentials/.DS_Store b/client-credentials/.DS_Store
new file mode 100644
index 0000000..5008ddf
Binary files /dev/null and b/client-credentials/.DS_Store differ
diff --git a/pom.xml b/pom.xml
index 706ddd6..aafd9e8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,6 +10,7 @@
client-credentials
client-credentials-springboot2
+ authorization-code
pom