package cn.iselab.mooctest.user.constants;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author ROKG
 * @Description
 * @Date: Created in 下午2:45 2018/2/14
 * @Modified By:
 */
@Component
public class UrlConstants {

    public static final String API_INTEGRAL="/api/integral";

    public static final String API_MEDAL="/api/medal";

    public static final String PAGE="/page/";

    public static final String API="/api/";


    public static String DEFAULT_GOTO="http://www.cofortest.com";

    public static final String GET_GITHUB_LOGIN_ACCESSTOKEN = "https://github.com/login/oauth/access_token?code=CODE&client_id=CLIENTID&client_secret=CLIENTSECRET";

    public static final String GET_GITHUB_USER_INFO = "https://api.github.com/user?access_token=ACCESSTOKEN";

    public static String GO_LOGIN = "http://user.cofortest.com/page/login";

    @Value("${default.goto}")
    public void setDefaultGoto(String defaultGoto){
        DEFAULT_GOTO = defaultGoto;
    }

    @Value("${default.login}")
    public void setGoLogin(String goLogin){
        GO_LOGIN = goLogin;
    }

}
