public final class Auth2RequestHolder extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
AUTH_REQUEST_PACKAGE
AuthDefaultRequest 子类的包名 |
static String |
AUTH_REQUEST_PREFIX
AuthDefaultRequest 子类类名前缀 |
static String |
AUTH_REQUEST_SUFFIX
AuthDefaultRequest 子类类名后缀 |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
afterPropertiesSet() |
static Collection<String> |
getAllProviderIds()
获取有效的 providerIds
|
static Auth2DefaultRequest |
getAuth2DefaultRequest(String providerId)
根据 providerId 获取
Auth2DefaultRequest |
static Class<?> |
getAuthRequestClassBySource(me.zhyd.oauth.config.AuthSource source)
根据
AuthSource 获取对应的 AuthDefaultRequest 子类的 Class |
static Auth2RequestHolder |
getInstance()
获取单例模式
Auth2RequestHolder |
static String |
getProviderId(me.zhyd.oauth.config.AuthSource source)
根据
AuthSource 获取 providerId, 注意: 必须在程序初始化后完成后才能调用. |
static String |
getProviderIdBySource(me.zhyd.oauth.config.AuthSource source)
根据
AuthSource 获取对应的 Auth2Properties 字段名称(即 providerId) |
static Collection<String> |
getValidProviderIds()
获取有效的 providerIds
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
static void |
setAuthCustomizeSource(AuthCustomizeSource authCustomizeSource)
当
authCustomizeSource 为 null 时, authCustomizeSource 将会被设置到 authCustomizeSource; 否则什么都不做. |
static void |
setAuthGitlabPrivateSource(AuthGitlabPrivateSource authGitlabPrivateSource)
当
authGitlabPrivateSource 为 null 时, authGitlabPrivateSource 将会被设置到 authGitlabPrivateSource; 否则什么都不做. |
public static final String AUTH_REQUEST_PACKAGE
AuthDefaultRequest 子类的包名public static final String AUTH_REQUEST_PREFIX
AuthDefaultRequest 子类类名前缀public static Auth2RequestHolder getInstance()
Auth2RequestHolderAuth2RequestHolderpublic static void setAuthCustomizeSource(AuthCustomizeSource authCustomizeSource)
authCustomizeSource 为 null 时, authCustomizeSource 将会被设置到 authCustomizeSource; 否则什么都不做.authCustomizeSource - auth2 Customize Sourcepublic static void setAuthGitlabPrivateSource(AuthGitlabPrivateSource authGitlabPrivateSource)
authGitlabPrivateSource 为 null 时, authGitlabPrivateSource 将会被设置到 authGitlabPrivateSource; 否则什么都不做.authGitlabPrivateSource - auth2 GitlabPrivate Source@Nullable public static Auth2DefaultRequest getAuth2DefaultRequest(String providerId)
Auth2DefaultRequestproviderId - providerIdAuth2DefaultRequest, 当没有对应的 Auth2DefaultRequest 时, 返回 nullpublic static String getProviderId(me.zhyd.oauth.config.AuthSource source)
AuthSource 获取 providerId, 注意: 必须在程序初始化后完成后才能调用.source - AuthSourcepublic static Collection<String> getValidProviderIds()
public static Collection<String> getAllProviderIds()
public void setApplicationContext(@NonNull
org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext 在接口中 org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void afterPropertiesSet()
throws Exception
afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBeanExceptionpublic static String getProviderIdBySource(@NonNull me.zhyd.oauth.config.AuthSource source)
AuthSource 获取对应的 Auth2Properties 字段名称(即 providerId)source - AuthSourceAuthSource 对应的 Auth2Properties 字段名称(即 providerId)@NonNull public static Class<?> getAuthRequestClassBySource(@NonNull me.zhyd.oauth.config.AuthSource source) throws ClassNotFoundException
AuthSource 获取对应的 AuthDefaultRequest 子类的 Classsource - AuthSourceAuthSource 对应的 AuthDefaultRequest 子类的 ClassClassNotFoundExceptionCopyright © 2021. All rights reserved.