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


Java ClientAuthConfig类代码示例

本文整理汇总了Java中javax.security.auth.message.config.ClientAuthConfig的典型用法代码示例。如果您正苦于以下问题:Java ClientAuthConfig类的具体用法?Java ClientAuthConfig怎么用?Java ClientAuthConfig使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ClientAuthConfig类属于javax.security.auth.message.config包,在下文中一共展示了ClientAuthConfig类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getClientAuthConfig

import javax.security.auth.message.config.ClientAuthConfig; //导入依赖的package包/类
/**
 * @see AuthConfigProvider#getClientAuthConfig(String, String, CallbackHandler)
 */
public ClientAuthConfig getClientAuthConfig(String layer, String appContext, 
      CallbackHandler handler) throws AuthException
{ 
   //TODO: Throw SecurityException if user has no perms
   if(handler == null)
   {
      try
      {
          handler = this.instantiateCallbackHandler();  
      } 
      catch(Exception e)
      {
         throw new AuthException(e.getLocalizedMessage());
      }
   }
   
      
   return new JBossClientAuthConfig(layer,appContext, handler, contextProperties);
}
 
开发者ID:picketbox,项目名称:picketbox,代码行数:23,代码来源:JBossAuthConfigProvider.java

示例2: testClientFactoryConfig

import javax.security.auth.message.config.ClientAuthConfig; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public void testClientFactoryConfig() throws Exception
{ 
   assertNotNull("AuthConfigFactory is ! null", factory); 
   AuthConfigProvider provider = factory.getConfigProvider("TEST", "APP", null);
   assertNotNull("AuthConfigProvider is ! null", provider);
   
   ClientAuthConfig clientConfig =
      provider.getClientAuthConfig("TEST", "APP", 
            new AppCallbackHandler("anil","anil".toCharArray()));
   assertNotNull("ClientAuthConfig ! null", clientConfig); 
   MessageInfo mi = new GenericMessageInfo(new Object(), new Object());
   String authContextID = clientConfig.getAuthContextID(mi);
   assertNotNull("AuthContext ID != null",authContextID);
   ClientAuthContext sctx = clientConfig.getAuthContext(authContextID, 
         new Subject(), new HashMap());
   assertNotNull("ClientAuthContext != null",sctx); 
}
 
开发者ID:picketbox,项目名称:picketbox,代码行数:19,代码来源:JASPIConfigUnitTestCase.java

示例3: JaspiClientAuthenticator

import javax.security.auth.message.config.ClientAuthConfig; //导入依赖的package包/类
public JaspiClientAuthenticator(ClientAuthConfig clientConfig, String securityDomain, JASPIAuthenticationInfo jpi)
{

   this.clientConfig = clientConfig;
   this.securityDomain = securityDomain;
   this.jpi = jpi;
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:8,代码来源:JaspiClientAuthenticator.java

示例4: getClientAuthConfig

import javax.security.auth.message.config.ClientAuthConfig; //导入依赖的package包/类
/**
 * There is no client side module.
 * 
 * @return <code>null</code>
 */
@Override
public ClientAuthConfig getClientAuthConfig(final String layer,
        final String appContext,
        final CallbackHandler handler) throws AuthException {
    return null;
}
 
开发者ID:trajano,项目名称:openid-connect,代码行数:12,代码来源:OpenIdConnectModuleConfigProvider.java

示例5: getClientAuthConfig

import javax.security.auth.message.config.ClientAuthConfig; //导入依赖的package包/类
@Override
public ClientAuthConfig getClientAuthConfig(String layer, String appContext, CallbackHandler callbackHandler) throws AuthException {
    return null;
}
 
开发者ID:polarsys,项目名称:eplmp,代码行数:5,代码来源:CustomAuthConfigProvider.java

示例6: getClientAuthConfig

import javax.security.auth.message.config.ClientAuthConfig; //导入依赖的package包/类
@Override
public ClientAuthConfig getClientAuthConfig(String layer, String appContext, CallbackHandler handler)
    throws AuthException, SecurityException {
  return null;
}
 
开发者ID:erik-wramner,项目名称:YubikeyAuth,代码行数:6,代码来源:YubiAuthConfigProvider.java

示例7: getClientAuthConfig

import javax.security.auth.message.config.ClientAuthConfig; //导入依赖的package包/类
@Override
public ClientAuthConfig getClientAuthConfig(String layer, String appContext, CallbackHandler handler)
      throws AuthException, SecurityException
{
   return new JBossWSClientAuthConfig(layer, appContext, handler, contextProperties);
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:7,代码来源:JBossWSAuthConfigProvider.java

示例8: enableClientAuthentication

import javax.security.auth.message.config.ClientAuthConfig; //导入依赖的package包/类
public boolean enableClientAuthentication(Object target, Map<String, String> properties)
{
   if (!(target instanceof Client)) {
      Loggers.ROOT_LOGGER.cannotEnableJASPIAuthentication(target.getClass().getSimpleName());
      return false;
   }
   Client client = (Client)target;
   String securityDomain = properties.get(JaspiClientAuthenticator.JASPI_SECURITY_DOMAIN);
   if (securityDomain == null)
   {
      return false;
   }
   ApplicationPolicy appPolicy = SecurityConfiguration.getApplicationPolicy(securityDomain);
   if (appPolicy == null)
   {
      Loggers.ROOT_LOGGER.noApplicationPolicy(securityDomain);
      return false;
   }
   BaseAuthenticationInfo bai = appPolicy.getAuthenticationInfo();
   if (bai == null || bai instanceof AuthenticationInfo)
   {
      Loggers.ROOT_LOGGER.noJaspiApplicationPolicy(securityDomain);
      return false;
   }
   JASPIAuthenticationInfo jai = (JASPIAuthenticationInfo) bai;

   String contextRoot = client.getEndpoint().getEndpointInfo().getName().toString();
   String appId = "localhost " + contextRoot;
   AuthConfigFactory factory = AuthConfigFactory.getFactory();

   Properties props = new Properties();
   AuthConfigProvider provider = new JBossWSAuthConfigProvider(props, factory);
   provider = factory.getConfigProvider(JBossWSAuthConstants.SOAP_LAYER, appId, null);
   JBossCallbackHandler callbackHandler = new JBossCallbackHandler();
   try
   {
      ClientAuthConfig clientConfig = provider.getClientAuthConfig("soap", appId, callbackHandler);
      JaspiClientAuthenticator clientAuthenticator = new JaspiClientAuthenticator(clientConfig, securityDomain, jai);
      client.getInInterceptors().add(new JaspiClientInInterceptor(clientAuthenticator));
      client.getOutInterceptors().add(new JaspiClientOutInterceptor(clientAuthenticator));
   }
   catch (Exception e)
   {
      Loggers.DEPLOYMENT_LOGGER.cannotCreateServerAuthContext(securityDomain, e);
   }

   return false;

}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:50,代码来源:DefaultJASPIAuthenticationProvider.java

示例9: getClientAuthConfig

import javax.security.auth.message.config.ClientAuthConfig; //导入依赖的package包/类
public ClientAuthConfig getClientAuthConfig(String layer, 
      String appcontext, CallbackHandler handler) throws AuthException,
      SecurityException
{ 
   return new TestClientAuthConfig();
}
 
开发者ID:picketbox,项目名称:picketbox,代码行数:7,代码来源:TestAuthConfigProvider.java

示例10: getClientAuthConfig

import javax.security.auth.message.config.ClientAuthConfig; //导入依赖的package包/类
@Override
public ClientAuthConfig getClientAuthConfig(String layer, String appContext, CallbackHandler handler) throws AuthException,
        SecurityException {
    return null;
}
 
开发者ID:ftomassetti,项目名称:JavaIncrementalParser,代码行数:6,代码来源:TestAuthConfigProvider.java

示例11: getClientAuthConfig

import javax.security.auth.message.config.ClientAuthConfig; //导入依赖的package包/类
@Override
public ClientAuthConfig getClientAuthConfig(String layer,
        String appContext, CallbackHandler handler) throws AuthException,
        SecurityException {
    return null;
}
 
开发者ID:arjantijms,项目名称:jaspic-capabilities-test,代码行数:7,代码来源:TestAuthConfigProvider.java

示例12: getClientAuthConfig

import javax.security.auth.message.config.ClientAuthConfig; //导入依赖的package包/类
@Override
public ClientAuthConfig getClientAuthConfig(String layer, String appContext, CallbackHandler handler) throws AuthException, SecurityException {
    return null;
}
 
开发者ID:apache,项目名称:tomee,代码行数:5,代码来源:TheAuthConfigProvider.java

示例13: getClientAuthConfig

import javax.security.auth.message.config.ClientAuthConfig; //导入依赖的package包/类
/**
 * <p>
 * Client authentication is not provided.
 * </p>
 * {@inheritDoc}
 *
 * @return <code>null</code>
 */
@Override
public ClientAuthConfig getClientAuthConfig(final String layer,
    final String appContext,
    final CallbackHandler handler) throws AuthException {

    return null;
}
 
开发者ID:trajano,项目名称:jaspic-tester,代码行数:16,代码来源:AuthModuleConfigProvider.java


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