Source

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

package test

import com.mingidea.security.AuthenticationDao
import org.springframework.security.core.userdetails.UserDetails
import com.mingidea.security.taobao.TaobaoUser


class TestTaobaoAuthenticationDao implements AuthenticationDao<TaobaoUser> {



	public TaobaoUser find(String nick, String appKey) {
		return null;
	}

	public void update(TaobaoUser taobaoUser) {
		// TODO Auto-generated method stub
		
	}

	public void create(TaobaoUser taobaoUser) {
		print 'create taobao user: ' + taobaoUser.id

	}

	public UserDetails getPrincipal(TaobaoUser taobaoUser) {
		// TODO Auto-generated method stub
		return new org.springframework.security.core.userdetails.User("xx", "", true, true, true, true, []);
	}

}