Browse Source

first commit

tags/V2.2.0
chenjiandong 2 years ago
parent
commit
4a0ee15ee5
2 changed files with 2 additions and 5 deletions
  1. +1
    -4
      Spring_Authorization_Server/src/main/java/com/tuoheng/config/SecurityConfig.java
  2. +1
    -1
      others/To-Use.text

+ 1
- 4
Spring_Authorization_Server/src/main/java/com/tuoheng/config/SecurityConfig.java View File

@@ -13,8 +13,6 @@ import org.springframework.security.config.annotation.web.configurers.Expression
import org.springframework.security.config.annotation.web.configurers.oauth2.server.authorization.OAuth2AuthorizationServerConfigurer;
import org.springframework.security.config.annotation.web.configurers.oauth2.server.resource.OAuth2ResourceServerConfigurer;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.oauth2.core.oidc.OidcUserInfo;
import org.springframework.security.oauth2.server.authorization.config.ProviderSettings;
import org.springframework.security.oauth2.server.authorization.oidc.authentication.OidcUserInfoAuthenticationContext;
@@ -81,9 +79,8 @@ public class SecurityConfig {
SecurityFilterChain defaultSecurityFilterChain(HttpSecurity http) throws Exception {
http.csrf().disable()
.authorizeHttpRequests((authorize) -> authorize

.antMatchers("/getHealth").permitAll()
.antMatchers("/user/create").permitAll()
//.antMatchers("/user/create").permitAll()
.anyRequest().authenticated()
)
// Form login handles the redirect to the login page from the

+ 1
- 1
others/To-Use.text View File

@@ -3,7 +3,7 @@ Server端 项目
http://127.0.0.1:8090/oauth2/authorize?
client_id=tuoheng-dsp
&response_type=code
&scope=openid+profile+email
&scope=openid+profile
&redirect_uri=http://192.168.11.11:8086/home
&state=4991a0e66547452286dd56e0d9473a0e


Loading…
Cancel
Save