提交 ad433e15 编写于 作者: C chengshiping

【安全篇】Spring Boot 整合 Spring Authorization Server

上级 6a5a4554
......@@ -49,7 +49,7 @@
<version>0.3.1</version>
</dependency>
<!-- springboot security -->
<!-- Springboot Security -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
......
......@@ -55,7 +55,6 @@ public class AuthServerConfiguration {
return http.formLogin(Customizer.withDefaults()).build();
}
// @formatter:off
@Bean
public RegisteredClientRepository registeredClientRepository() {
RegisteredClient client =
......@@ -74,7 +73,6 @@ public class AuthServerConfiguration {
.build();
return new InMemoryRegisteredClientRepository(client);
}
// @formatter:on
@Bean
@SneakyThrows
......@@ -85,7 +83,6 @@ public class AuthServerConfiguration {
RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic();
RSAPrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate();
// @formatter:off
RSAKey rsaKey =
new RSAKey.Builder(publicKey)
.privateKey(privateKey)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册