From 9a24e9adbc0477719fed960b879f8e5dcf870aba Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Fri, 22 Dec 2017 16:14:37 +0800
Subject: [PATCH] Merge branch 'master' of ssh://blit.7drlb.com:29418/screen_api_v2
---
src/main/java/com/moral/security/WebSecurityConfiguration.java | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/main/java/com/moral/security/WebSecurityConfiguration.java b/src/main/java/com/moral/security/WebSecurityConfiguration.java
index 78b3e36..98f1146 100644
--- a/src/main/java/com/moral/security/WebSecurityConfiguration.java
+++ b/src/main/java/com/moral/security/WebSecurityConfiguration.java
@@ -20,6 +20,7 @@
import org.springframework.security.oauth2.provider.approval.TokenStoreUserApprovalHandler;
import org.springframework.security.oauth2.provider.request.DefaultOAuth2RequestFactory;
import org.springframework.security.oauth2.provider.token.TokenStore;
+import org.springframework.security.oauth2.provider.token.store.InMemoryTokenStore;
import org.springframework.security.oauth2.provider.token.store.redis.RedisTokenStore;
@Configuration
@@ -48,10 +49,10 @@
@Override
protected void configure(HttpSecurity http) throws Exception {
- http
- .anonymous().disable()
- .authorizeRequests()
- .antMatchers("/oauth/token").permitAll();
+ http.csrf().disable(); //TODO ������������CSRF
+ http.anonymous().disable()
+ .authorizeRequests()
+ .antMatchers("/oauth/token").permitAll();
}
@Override
@@ -63,8 +64,8 @@
@Bean
public TokenStore tokenStore() {
- //return new InMemoryTokenStore();
- return new RedisTokenStore(redisConnection);
+ return new InMemoryTokenStore();
+ //return new RedisTokenStore(redisConnection);
}
@Bean
--
Gitblit v1.8.0