package com.palmnest.application;

/**
 * 爱内购-OAuth认证 相关常量
 *
 * @author qzy
 * @since 2017-11-28 17:00:00
 */
public class OAuthConstants {

	public static final String ACCESS_TOKEN                  = "access_token";
	public static final String CLIENT_ID                     = "client_id";
	public static final String CLIENT_SECRET                 = "client_secret";
	public static final String REFRESH_TOKEN                 = "refresh_token";
	public static final String USERNAME                      = "username";
	public static final String PASSWORD                      = "password";
	public static final String CODE                          = "code";
	public static final String CALLER                        = "caller";
	public static final String AUTHENTICATION_SERVER_URL     = "authentication_server_url";
	public static final String CONFIG_FILE_PATH              = "oauth2Client.properties";
	public static final String RESOURCE_SERVER_URL           = "resource_server_url";
	public static final String GRANT_TYPE                    = "grant_type";
	public static final String GRANT_TYPE_PASSWORD           = "password";
	public static final String GRANT_TYPE_AUTHORIZATION_CODE = "authorization_code";
	public static final String GRANT_TYPE_CLIENT_CREDENTIALS = "client_credentials";
	public static final String SCOPE                         = "scope";
	public static final String AUTHORIZATION                 = "Authorization";
	public static final String BEARER                        = "Bearer";
	public static final String BASIC                         = "Basic";
	public static final String JSON_CONTENT                  = "application/json";
	public static final String XML_CONTENT                   = "application/xml";
	public static final String URL_ENCODED_CONTENT           = "application/x-www-form-urlencoded";


	public static final String SURL                 = "surl";
	public static final String GATEWAY_URL          = "gateway_url";
	public static final String CREATEUSER_URL       = "createuser_url";
	public static final String CREATECOMPANY_URL    = "createcompany_url";
	public static final String DEFAULT_COMPANYID    = "default_companyid";
	public static final String CREATELOGINTOKEN_URL = "createlogintoken_url";

	public static final String GETUSERMESSAGE_URL = "getUserMessage_url";


	public static final int HTTP_OK           = 200;
	public static final int HTTP_FORBIDDEN    = 403;
	public static final int HTTP_UNAUTHORIZED = 401;


	//爱内购 集成 第一步 登录网关(Standard/Web/gateway) 返回 err_code  http://opendoc.neigou.com/pages/viewpage.action?pageId=917523
	public static final String NEIGOU_ERR_NOT_LOGIN                      = "ERR_NOT_LOGIN";//用户未登录
	public static final String NEIGOU_ERR_DIFF_USER                      = "ERR_DIFF_USER";//已经登录了不同的用户
	public static final String NEIGOU_ERR_DIFF_COMPANY                   = "ERR_DIFF_COMPANY";//用户已登录，但当前不在相应的公司
	public static final String NEIGOU_UNSPECIFIC_CHANNEL                 = "UNSPECIFIC_CHANNEL";//渠道不存在
	public static final String NEIGOU_ERR_COMPANY_OR_USER_NOT_ACCESSABLE = "ERR_COMPANY_OR_USER_NOT_ACCESSABLE";//用户或公司不存在
	//爱内购 集成 第一步 登录网关(Standard/Web/gateway) 返回 err_code  http://opendoc.neigou.com/pages/viewpage.action?pageId=917523
}
