Commits

明点软件 committed f2c58bf Merge

Merge

Comments (0)

Files changed (5)

 target/**
 web-app/WEB-INF/classes/**
 grails-spring-security-taobao-*.zip
+
+*spring-security-taobao-*.zip
 f4dd4bd2b16e88e51f1a2732934a1e58cb6c5f25 0.3.1
 aa5b8472555edd4276e5ff990454b93dafbac445 0.3.2
 e3f07b4f7d35fedc0255c37fd36eb5462cfa575f 0.3.3
+e3f07b4f7d35fedc0255c37fd36eb5462cfa575f 0.3.3
+0000000000000000000000000000000000000000 0.3.3
+0000000000000000000000000000000000000000 0.3.3
+baec4769543155e6b6276c1cee9c3f31ec03bf6e 0.3.3

SpringSecurityTaobaoGrailsPlugin.groovy

 
         SpringSecurityUtils.registerProvider 'taobaoAuthenticationProvider'
         SpringSecurityUtils.registerFilter 'taobaoAuthenticationFilter', SecurityFilterPosition.OPENID_FILTER
-        SpringSecurityUtils.registerFilter 'concurrencySessionFilter', SecurityFilterPosition.CONCURRENT_SESSION_FILTER
+        SpringSecurityUtils.registerFilter 'concurrentSessionFilter', SecurityFilterPosition.CONCURRENT_SESSION_FILTER
 
         taobaoAuthenticationProvider(TaobaoAuthenticationProvider) {
             appSecretMap = conf.taobao.appSecretMap
             maximumSessions = conf.maxConcurrentSessions //default is -1 for unlimited sessions
         }
         
-        concurrencySessionFilter(ConcurrentSessionFilter) {
+        concurrentSessionFilter(ConcurrentSessionFilter) {
             sessionRegistry = ref('sessionRegistry')
+            expiredUrl = conf.expiredUrl
         }
 		
         sessionRegistry(SessionRegistryImpl)

grails-app/conf/Config.groovy

     warn   'org.mortbay.log'
 }
 
+grails.plugins.springsecurity.expiredUrl = '/expired'
 
 // Added by the Spring Security Core plugin:
 grails.plugins.springsecurity.useHttpSessionEventPublisher = true 

grails-app/controllers/test/TestController.groovy

 import com.mingidea.security.taobao.util.ExSpringSecurityUtils
 
 class TestController {
-    def springSecurityService 
+    def springSecurityService 
+    def concurrentSessionFilter
     def index = { 
         def user = springSecurityService.currentUser
         render 'user id: ' + user.id
     def expire = {
         def userId = 1
         render ExSpringSecurityUtils.expireSession(userId)
+    }
+    
+    def p = {
+        println concurrentSessionFilter
     }
 }