Package javax.security.auth.message.config

Examples of javax.security.auth.message.config.AuthConfigFactory$RegistrationContext


/*     */   {
/* 376 */     AuthStatus status = AuthStatus.FAILURE;
/*     */     try
/*     */     {
/* 380 */       String contextID = PolicyContext.getContextID();
/* 381 */       AuthConfigFactory factory = AuthConfigFactory.getFactory();
/* 382 */       AuthConfigProvider provider = factory.getConfigProvider(layer, contextID, null);
/* 383 */       ServerAuthConfig serverConfig = provider.getServerAuthConfig(layer, contextID, new AppCallbackHandler("DUMMY", "DUMMY".toCharArray()));
/*     */
/* 385 */       ServerAuthContext sctx = serverConfig.getAuthContext(contextID, new Subject(), new HashMap());
/*     */
/* 387 */       if (clientSubject == null)
View Full Code Here


      AuthStatus status = AuthStatus.FAILURE;
     
      try
      {
         String contextID = PolicyContext.getContextID();
         AuthConfigFactory factory = AuthConfigFactory.getFactory();
         AuthConfigProvider provider = factory.getConfigProvider(layer,contextID,null);
         if(provider == null)
            throw new IllegalStateException("Provider is null for "+ layer + " for "+ contextID);
        
         ServerAuthConfig serverConfig = provider.getServerAuthConfig(layer,contextID,handler)
         ServerAuthContext sctx = serverConfig.getAuthContext(contextID,
View Full Code Here

                /*String defaultFactory = Security.getProperty(AuthConfigFactory.DEFAULT_FACTORY_SECURITY_PROPERTY);
                if (defaultFactory == null || !(JMACAuthConfigFactory.class.getName().equals(defaultFactory))) {
                Security.setProperty(AuthConfigFactory.DEFAULT_FACTORY_SECURITY_PROPERTY,
                JMACAuthConfigFactory.class.getName());
                }*/
                AuthConfigFactory factory = AuthConfigFactory.getFactory();
                if (factory == null || !(factory instanceof JMACAuthConfigFactory)) {
                    AuthConfigFactory.setFactory(new JMACAuthConfigFactory(loader));
                }
                return null; // nothing to return
            }
View Full Code Here

                     new Holder<List<Extension>>(),
                     registrationHandle,
                     registrationState
                  );

                  RegistrationContext registrationContext = WSRPTypeFactory.createRegistrationContext(registrationHandle.value);
                  registrationContext.setRegistrationState(registrationState.value);

                  persistentRegistrationInfo.setRegistrationContext(registrationContext);
                  String msg = "Consumer with id '" + persistentId + "' successfully registered with handle: '"
                     + registrationContext.getRegistrationHandle() + "'";
                  log.debug(msg);
                  RefreshResult res = new RefreshResult();
                  res.setRegistrationResult(result);
                  return res;
               }
View Full Code Here

      {
         persistentEndpointInfo.refresh();

         try
         {
            RegistrationContext registrationContext = getRegistrationContext();
            persistentEndpointInfo.getRegistrationService().deregister(
               registrationContext.getRegistrationHandle(),
               registrationContext.getRegistrationState(),
               new ArrayList<Extension>());
            log.info("Consumer with id '" + persistentId + "' deregistered.");
         }
         catch (Exception e)
         {
View Full Code Here

      {
         persistentEndpointInfo.refresh();

         try
         {
            RegistrationContext registrationContext = getRegistrationContext();
            Holder<byte[]> registrationState = new Holder<byte[]>();

            // invocation
            persistentEndpointInfo.getRegistrationService().modifyRegistration(
               registrationContext,
View Full Code Here

   public RegistrationContext getRegistrationContext()
   {
      if (persistentRegistrationHandle != null)
      {
         RegistrationContext registrationContext = WSRPTypeFactory.createRegistrationContext(persistentRegistrationHandle);
         registrationContext.setRegistrationState(persistentRegistrationState);
         return registrationContext;
      }
      else
      {
         return null;
View Full Code Here

      WSRP2ExceptionFactory.throwOperationFailedIfValueIsMissing(gs, "GetServiceDescription");

      try
      {
         // if a RegistrationContext is provided, we need to validate the registration information
         RegistrationContext registrationContext = gs.getRegistrationContext();
         Registration registration = null;
         if (registrationContext != null)
         {
            registration = producer.getRegistrationOrFailIfInvalid(registrationContext);
            RegistrationLocal.setRegistration(registration);
View Full Code Here

         throw WSRP2ExceptionFactory.createWSException(MissingParameters.class, "Missing required portletContext in CopyPortlets.", null);
      }

      Registration fromRegistration = producer.getRegistrationOrFailIfInvalid(copyPortlets.getFromRegistrationContext());

      RegistrationContext toRegistationContext = copyPortlets.getToRegistrationContext();

      //if toRegistrationContext is null, then we use the fromRegistrationContext (from spec).
      //NOTE: this means we can't move between a PortletContext on a registered consumer to a non-registered consumer
      // between two non-registered consumers will still be ok.
      if (toRegistationContext == null)
View Full Code Here

                     new Holder<Lifetime>(),
                     new Holder<List<Extension>>(),
                     registrationHandle
                  );

                  RegistrationContext registrationContext = WSRPTypeFactory.createRegistrationContext(registrationHandle.value);
                  registrationContext.setRegistrationState(registrationState.value);

                  persistentRegistrationInfo.setRegistrationContext(registrationContext);

                  if (debug)
                  {
                     String msg = "Consumer with id '" + persistentId + "' successfully registered with handle: '"
                        + registrationContext.getRegistrationHandle() + "'";
                     log.debug(msg);
                  }

                  RefreshResult res = new RefreshResult();
View Full Code Here

TOP

Related Classes of javax.security.auth.message.config.AuthConfigFactory$RegistrationContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.