
package com.lutao.cloud.common.security.service;

import com.lutao.cloud.admin.api.dto.UserInfo;
import com.lutao.cloud.common.core.util.MessageInfo;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

/**

 * @date 2018/8/15
 */
public interface CloudUserDetailsService extends UserDetailsService{

	/**
	 * 根据社交登录code 登录
	 * @param code TYPE@CODE
	 * @return UserDetails
	 * @throws UsernameNotFoundException
	 */
	UserDetails loadUserBySocial(String code) throws UsernameNotFoundException;

	CloudUser getUserDetails(MessageInfo<UserInfo> result);
}
