当前位置: 首页>>代码示例>>Java>>正文


Java OAuthServerConfiguration.getInstance方法代码示例

本文整理汇总了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");
    }
}
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:25,代码来源:OAuthServiceComponent.java

示例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());
}
 
开发者ID:wso2,项目名称:msf4j,代码行数:9,代码来源:JWTAccessTokenBuilder.java

示例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());
    }
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:7,代码来源:DefaultIDTokenBuilder.java

示例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.");
    }
}
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:44,代码来源:OAuth2ServiceComponent.java


注:本文中的org.wso2.carbon.identity.oauth.config.OAuthServerConfiguration.getInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。