All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.quhaodian.user.data.service.impl.OauthServiceImpl Maven / Gradle / Ivy

There is a newer version: 1.8.7
Show newest version
package com.quhaodian.user.data.service.impl;

import com.quhaodian.user.data.entity.UserInfo;
import com.quhaodian.user.data.service.OauthService;
import com.quhaodian.user.plugs.base.OauthPlugin;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;


@Service
public class OauthServiceImpl implements OauthService {

    @Resource
    private Map oauthPlugins = new HashMap();

    @Override
    public UserInfo login(String plug, String code) {
        OauthPlugin plugin = oauthPlugins.get(plug);
        if (plugin == null) {
            return null;
        }
        return plugin.login(code);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy