/** * <p> * Constructs and returns a {@code ClaimsProcessor} from the specified class name. The processor is initialized * with the specified properties map. * </p> * * @param processorClass the FQN of the {@code ClaimsProcessor} to be instantiated. * @param properties a {@code Map<String, String>} containing the properties that have been configured for the * claims processor. * @return a reference to the constructed {@code ClaimsProcessor} object. */ public ClaimsProcessor createClaimsProcessor(String processorClass, Map<String, String> properties) { try { Class<?> clazz = SecurityActions.loadClass(getClass(), processorClass); if (clazz == null) throw new RuntimeException(ErrorCodes.CLASS_NOT_LOADED + processorClass); ClaimsProcessor claimsProcessor = (ClaimsProcessor) clazz.newInstance(); claimsProcessor.initialize(properties); return claimsProcessor; } catch (Exception pae) { throw new RuntimeException(ErrorCodes.CANNOT_CREATE_INSTANCE + "claims processor " + processorClass, pae); } } }
requestContext.setClaimedAttributes(processor.processClaims(claims, callerPrincipal)); else if (log.isDebugEnabled()) log.debug("Claims have been specified in the request but no processor was found for dialect "
requestContext.setClaimedAttributes(processor.processClaims(claims, callerPrincipal)); else if (log.isDebugEnabled()) log.debug("Claims have been specified in the request but no processor was found for dialect "
/** * <p> * Constructs and returns a {@code ClaimsProcessor} from the specified class name. The processor is initialized * with the specified properties map. * </p> * * @param processorClass the FQN of the {@code ClaimsProcessor} to be instantiated. * @param properties a {@code Map<String, String>} containing the properties that have been configured for the * claims processor. * @return a reference to the constructed {@code ClaimsProcessor} object. */ public ClaimsProcessor createClaimsProcessor(String processorClass, Map<String, String> properties) { try { Class<?> clazz = SecurityActions.loadClass(getClass(), processorClass); if (clazz == null) throw new RuntimeException(ErrorCodes.CLASS_NOT_LOADED + processorClass); ClaimsProcessor claimsProcessor = (ClaimsProcessor) clazz.newInstance(); claimsProcessor.initialize(properties); return claimsProcessor; } catch (Exception pae) { throw new RuntimeException(ErrorCodes.CANNOT_CREATE_INSTANCE + "claims processor " + processorClass, pae); } } }
requestContext.setClaimedAttributes(processor.processClaims(claims, callerPrincipal)); else if (logger.isDebugEnabled()) logger.debug("Claims have been specified in the request but no processor was found for dialect " + claims.getDialect());
/** * <p> * Constructs and returns a {@code ClaimsProcessor} from the specified class name. The processor is initialized with the * specified properties map. * </p> * * @param processorClass the FQN of the {@code ClaimsProcessor} to be instantiated. * @param properties a {@code Map<String, String>} containing the properties that have been configured for the claims * processor. * @return a reference to the constructed {@code ClaimsProcessor} object. */ public ClaimsProcessor createClaimsProcessor(String processorClass, Map<String, String> properties) { try { Class<?> clazz = SecurityActions.loadClass(getClass(), processorClass); if (clazz == null) throw logger.classNotLoadedError(processorClass); ClaimsProcessor claimsProcessor = (ClaimsProcessor) clazz.newInstance(); claimsProcessor.initialize(properties); return claimsProcessor; } catch (Exception pae) { throw new RuntimeException(logger.couldNotCreateInstance("claims processor " + processorClass, pae)); } } }
requestContext.setClaimedAttributes(processor.processClaims(claims, callerPrincipal)); else if (logger.isDebugEnabled()) logger.debug("Claims have been specified in the request but no processor was found for dialect " + claims.getDialect());
/** * <p> * Constructs and returns a {@code ClaimsProcessor} from the specified class name. The processor is initialized with * the * specified properties map. * </p> * * @param processorClass the FQN of the {@code ClaimsProcessor} to be instantiated. * @param properties a {@code Map<String, String>} containing the properties that have been configured for the * claims * processor. * * @return a reference to the constructed {@code ClaimsProcessor} object. */ public ClaimsProcessor createClaimsProcessor(String processorClass, Map<String, String> properties) { try { Class<?> clazz = SecurityActions.loadClass(getClass(), processorClass); if (clazz == null) throw logger.classNotLoadedError(processorClass); ClaimsProcessor claimsProcessor = (ClaimsProcessor) clazz.newInstance(); claimsProcessor.initialize(properties); return claimsProcessor; } catch (Exception pae) { throw new RuntimeException(logger.couldNotCreateInstance("claims processor " + processorClass, pae)); } } }
requestContext.setClaimedAttributes(processor.processClaims(claims, callerPrincipal)); else if (logger.isDebugEnabled()) logger.debug("Claims have been specified in the request but no processor was found for dialect " + claims.getDialect());
/** * <p> * Constructs and returns a {@code ClaimsProcessor} from the specified class name. The processor is initialized with * the * specified properties map. * </p> * * @param processorClass the FQN of the {@code ClaimsProcessor} to be instantiated. * @param properties a {@code Map<String, String>} containing the properties that have been configured for the * claims * processor. * * @return a reference to the constructed {@code ClaimsProcessor} object. */ public ClaimsProcessor createClaimsProcessor(String processorClass, Map<String, String> properties) { try { Class<?> clazz = SecurityActions.loadClass(getClass(), processorClass); if (clazz == null) throw logger.classNotLoadedError(processorClass); ClaimsProcessor claimsProcessor = (ClaimsProcessor) clazz.newInstance(); claimsProcessor.initialize(properties); return claimsProcessor; } catch (Exception pae) { throw new RuntimeException(logger.couldNotCreateInstance("claims processor " + processorClass, pae)); } } }