public abstract class AbstractOauth extends java.lang.Object implements Config, OauthGateway
限定符和类型 | 字段和说明 |
---|---|
protected java.lang.String |
channel |
static java.lang.String |
CONFIG_APP_KEY |
static java.lang.String |
CONFIG_APP_SECRET |
static java.lang.String |
CONFIG_CODE |
static java.lang.String |
CONFIG_CODE_DESCRIPTION |
static java.lang.String |
CONFIG_RETURN_URL |
protected ConfigDataComponent |
configDataConponent |
protected static org.apache.http.impl.client.CloseableHttpClient |
httpclient |
protected org.apache.commons.logging.Log |
log |
protected java.lang.String |
prefix |
CONFIG_CODE_DESCRIPTION_SUFFIX, CONFIGPREFIX, INPUT_TYPE_EDITORS, INPUT_TYPE_FILES, INPUT_TYPE_PRIVATE_FILES, INPUTTYPE_BOOLEAN, INPUTTYPE_CAPTCHA, INPUTTYPE_CATEGORY, INPUTTYPE_CATEGORY_PATH, INPUTTYPE_CATEGORYTYPE, INPUTTYPE_COLOR, INPUTTYPE_CONTENT, INPUTTYPE_CONTENT_STATUS, INPUTTYPE_DATE, INPUTTYPE_DATETIME, INPUTTYPE_DEPT, INPUTTYPE_DICTIONARY, INPUTTYPE_EMAIL, INPUTTYPE_FILE, INPUTTYPE_IMAGE, INPUTTYPE_KEYVALUE, INPUTTYPE_KEYWORDS, INPUTTYPE_LANG, INPUTTYPE_MODULE, INPUTTYPE_NUMBER, INPUTTYPE_PASSWORD, INPUTTYPE_PRIVATEFILE, INPUTTYPE_PRIVATEIMAGE, INPUTTYPE_PRIVATEVIDEO, INPUTTYPE_SURVEY, INPUTTYPE_TAG, INPUTTYPE_TAGTYPE, INPUTTYPE_TEMPLATE, INPUTTYPE_TEXT, INPUTTYPE_TEXTAREA, INPUTTYPE_TIME, INPUTTYPE_USER, INPUTTYPE_VIDEO, INPUTTYPE_VOTE
构造器和说明 |
---|
AbstractOauth(java.lang.String channel) |
限定符和类型 | 方法和说明 |
---|---|
boolean |
enabled(short siteId) |
protected java.lang.String |
get(java.lang.String url) |
abstract OauthAccess |
getAccessToken(short siteId,
java.lang.String code) |
java.lang.String |
getAuthorizeUrl(short siteId,
java.lang.String state) |
java.lang.String |
getChannel() |
java.lang.String |
getCode(short siteId,
boolean showAll) |
java.lang.String |
getCodeDescription(java.util.Locale locale) |
protected OauthConfig |
getConfig(short siteId) |
java.util.List<SysExtendField> |
getExtendFieldList(SysSite site,
java.util.Locale locale) |
OauthAccess |
getOpenId(short siteId,
java.lang.String code) |
protected java.lang.String |
post(java.lang.String url,
java.util.Map<java.lang.String,java.lang.String> parameters) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
exportable, getCode, getMessage
getAuthorizeUrl, getOpenId, getUserInfo, keyFunction
public static final java.lang.String CONFIG_CODE
public static final java.lang.String CONFIG_APP_KEY
public static final java.lang.String CONFIG_APP_SECRET
public static final java.lang.String CONFIG_RETURN_URL
public static final java.lang.String CONFIG_CODE_DESCRIPTION
protected ConfigDataComponent configDataConponent
protected static final org.apache.http.impl.client.CloseableHttpClient httpclient
protected final org.apache.commons.logging.Log log
protected java.lang.String channel
protected java.lang.String prefix
public java.lang.String getChannel()
getChannel
在接口中 OauthGateway
public boolean enabled(short siteId)
enabled
在接口中 OauthGateway
protected OauthConfig getConfig(short siteId)
siteId
- protected java.lang.String get(java.lang.String url) throws java.io.IOException
java.io.IOException
protected java.lang.String post(java.lang.String url, java.util.Map<java.lang.String,java.lang.String> parameters) throws java.io.IOException
java.io.IOException
public java.lang.String getAuthorizeUrl(short siteId, java.lang.String state)
getAuthorizeUrl
在接口中 OauthGateway
public OauthAccess getOpenId(short siteId, java.lang.String code) throws java.io.IOException
getOpenId
在接口中 OauthGateway
org.apache.http.client.ClientProtocolException
java.io.IOException
public abstract OauthAccess getAccessToken(short siteId, java.lang.String code) throws java.io.IOException
siteId
- code
- java.io.IOException
public java.lang.String getCode(short siteId, boolean showAll)
public java.lang.String getCodeDescription(java.util.Locale locale)
getCodeDescription
在接口中 Config
public java.util.List<SysExtendField> getExtendFieldList(SysSite site, java.util.Locale locale)
getExtendFieldList
在接口中 Config