Commits

明点软件  committed edaca0c

1.0.10

  • Participants
  • Parent commits a183647
  • Tags 1.0.10

Comments (0)

Files changed (3)

File SpringSecurityTaobaoGrailsPlugin.groovy

 */
 class SpringSecurityTaobaoGrailsPlugin {
     // the plugin version
-    def version = "1.0.8"
+    def version = "1.0.10"
     // the version or versions of Grails the plugin is designed for
     def grailsVersion = "2.1 > *"
     // the other plugins this plugin depends on
-<plugin name='spring-security-taobao' version='1.0.8' grailsVersion='2.1 &gt; *'>
+<plugin name='spring-security-taobao' version='1.0.10' grailsVersion='2.1 &gt; *'>
   <author>Simon Leung</author>
   <authorEmail>simon.r.leung@gmail.com</authorEmail>
   <title>Spring Security Taobao Plugin</title>

File src/java/com/mingidea/security/taobao/TaobaoAuthenticationProvider.java

             log.debug("create taobao user {}", nickname);
             taobaoUser = new TaobaoUser(nickname, appKey);
             copyProperties(credentials, taobaoUser);
+            taobaoAuthenticationDao.create(taobaoUser);
             applicationContext.publishEvent(new TaobaoUserCreatedEvent(this, taobaoUser));
         } else {
             log.debug("update taobao user {} with session {}", nickname, credentials.getSession());
      * copy properties from credentials to taobao user
      */
     private void copyProperties(TaobaoCredentials credentials, TaobaoUser taobaoUser) {
-        taobaoUser.setSession(taobaoUser.getSession());
+        taobaoUser.setSession(credentials.getSession());
         taobaoUser.setTimestamp(credentials.getTimestamp());
         taobaoUser.setExpiresIn(credentials.getExpiresIn());
         taobaoUser.setR1ExpiresIn(credentials.getR1ExpiresIn());