Source

Grails Spring Security Taobao / src / groovy / test / TestAlibabaAuthenticationDao.groovy

Full commit
package test

import com.mingidea.security.AuthenticationDao
import com.mingidea.security.alibaba.AlibabaUser
import com.mingidea.security.oauth.OAuthUser
import org.springframework.security.core.userdetails.UserDetails

/**
 * @author Liang Yong Rui
 */
class TestAlibabaAuthenticationDao implements AuthenticationDao<AlibabaUser> {
    @Override
    AlibabaUser find(String userId, String appKey) {
        println 'hello'
        return null
    }

    @Override
    void update(AlibabaUser user) {

    }

    @Override
    void create(AlibabaUser user) {
        print 'create alibaba user: ' + user.id
    }

    @Override
    UserDetails getPrincipal(AlibabaUser user) {
        return new org.springframework.security.core.userdetails.User("xx", "", true, true, true, true, []);
    }
}