本文整理汇总了Java中org.wso2.carbon.identity.oauth.config.OAuthServerConfiguration.getInstance方法的典型用法代码示例。如果您正苦于以下问题:Java OAuthServerConfiguration.getInstance方法的具体用法?Java OAuthServerConfiguration.getInstance怎么用?Java OAuthServerConfiguration.getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.wso2.carbon.identity.oauth.config.OAuthServerConfiguration
的用法示例。
在下文中一共展示了OAuthServerConfiguration.getInstance方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: activate
import org.wso2.carbon.identity.oauth.config.OAuthServerConfiguration; //导入方法依赖的package包/类
protected void activate(ComponentContext context) {
// initialize the OAuth Server configuration
OAuthServerConfiguration oauthServerConfig = OAuthServerConfiguration.getInstance();
if (oauthServerConfig.isCacheEnabled()) {
log.debug("OAuth Caching is enabled. Initializing the cache.");
// initialize the cache
OAuthCache cache = OAuthCache.getInstance();
if (cache != null) {
log.debug("OAuth Cache initialization was successful.");
} else {
log.debug("OAuth Cache initialization was unsuccessful.");
}
}
listener = new IdentityOathEventListener();
serviceRegistration = context.getBundleContext().registerService(UserOperationEventListener.class.getName(),
listener, null);
log.debug("Identity Oath Event Listener is enabled");
if (log.isDebugEnabled()) {
log.info("Identity OAuth bundle is activated");
}
}
示例2: JWTAccessTokenBuilder
import org.wso2.carbon.identity.oauth.config.OAuthServerConfiguration; //导入方法依赖的package包/类
public JWTAccessTokenBuilder() throws IdentityOAuth2Exception {
if (log.isDebugEnabled()) {
log.debug("JWT Access token builder is initiated");
}
config = OAuthServerConfiguration.getInstance();
//map signature algorithm from identity.xml to nimbus format, this is a one time configuration
signatureAlgorithm = mapSignatureAlgorithm(config.getSignatureAlgorithm());
}
示例3: DefaultIDTokenBuilder
import org.wso2.carbon.identity.oauth.config.OAuthServerConfiguration; //导入方法依赖的package包/类
public DefaultIDTokenBuilder() throws IdentityOAuth2Exception {
config = OAuthServerConfiguration.getInstance();
//map signature algorithm from identity.xml to nimbus format, this is a one time configuration
signatureAlgorithm = mapSignatureAlgorithm(config.getSignatureAlgorithm());
}
示例4: activate
import org.wso2.carbon.identity.oauth.config.OAuthServerConfiguration; //导入方法依赖的package包/类
protected void activate(ComponentContext context) {
//Registering OAuth2Service as a OSGIService
bundleContext = context.getBundleContext();
bundleContext.registerService(OAuth2Service.class.getName(), new OAuth2Service(), null);
// exposing server configuration as a service
OAuthServerConfiguration oauthServerConfig = OAuthServerConfiguration.getInstance();
bundleContext.registerService(OAuthServerConfiguration.class.getName(), oauthServerConfig, null);
OAuth2TokenValidationService tokenValidationService = new OAuth2TokenValidationService();
bundleContext.registerService(OAuth2TokenValidationService.class.getName(), tokenValidationService, null);
if (log.isDebugEnabled()) {
log.debug("Identity OAuth bundle is activated");
}
ServiceRegistration tenantMgtListenerSR = bundleContext.registerService(TenantMgtListener.class.getName(),
new OAuthTenantMgtListenerImpl(), null);
if (tenantMgtListenerSR != null) {
if (log.isDebugEnabled()) {
log.debug("OAuth - TenantMgtListener registered.");
}
} else {
log.error("OAuth - TenantMgtListener could not be registered.");
}
ServiceRegistration userStoreConfigEventSR = bundleContext.registerService(
UserStoreConfigListener.class.getName(), new OAuthUserStoreConfigListenerImpl(), null);
if (userStoreConfigEventSR != null) {
if (log.isDebugEnabled()) {
log.debug("OAuth - UserStoreConfigListener registered.");
}
} else {
log.error("OAuth - UserStoreConfigListener could not be registered.");
}
ServiceRegistration oauthApplicationMgtListenerSR = bundleContext.registerService(ApplicationMgtListener.class.getName(),
new OAuthApplicationMgtListener(), null);
if (oauthApplicationMgtListenerSR != null) {
if (log.isDebugEnabled()) {
log.debug("OAuth - ApplicationMgtListener registered.");
}
} else {
log.error("OAuth - ApplicationMgtListener could not be registered.");
}
}