/** * <p> * Constructs and returns a {@code SecurityTokenProvider} from the specified class name. * </p> * * @param providerClass the FQN of the {@code SecurityTokenProvider} to be instantiated. * @param properties a {@code Map<String, String>} containing the properties that have been configured for the * token provider. * @return a reference to the constructed {@code SecurityTokenProvider} object. */ public SecurityTokenProvider createTokenProvider(String providerClass, Map<String, String> properties) { try { Class<?> clazz = SecurityActions.loadClass(getClass(), providerClass); if (clazz == null) throw new RuntimeException(ErrorCodes.CLASS_NOT_LOADED + providerClass); SecurityTokenProvider tokenProvider = (SecurityTokenProvider) clazz.newInstance(); tokenProvider.initialize(properties); return tokenProvider; } catch (Exception pae) { throw new RuntimeException(ErrorCodes.CANNOT_CREATE_INSTANCE + providerClass, pae); } }
/** * <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); } } }
/** * <p> * Constructs and returns the {@code WSTrustRequestHandler} that will be used to handle WS-Trust requests. * </p> * * @param configuration a reference to the {@code STSConfiguration}. * @return a reference to the constructed {@code WSTrustRequestHandler} object. */ public WSTrustRequestHandler createRequestHandler(String handlerClassName, STSConfiguration configuration) { try { Class<?> clazz = SecurityActions.loadClass(getClass(), handlerClassName); if (clazz == null) throw new RuntimeException(ErrorCodes.CLASS_NOT_LOADED + handlerClassName); WSTrustRequestHandler handler = (WSTrustRequestHandler) clazz.newInstance(); handler.initialize(configuration); return handler; } catch (Exception e) { throw new RuntimeException(e.getMessage(), e); } }
/** * <p> * Constructs and returns the {@code WSTrustRequestHandler} that will be used to handle WS-Trust requests. * </p> * * @param configuration a reference to the {@code STSConfiguration}. * @return a reference to the constructed {@code WSTrustRequestHandler} object. */ public WSTrustRequestHandler createRequestHandler(String handlerClassName, STSConfiguration configuration) { try { Class<?> clazz = SecurityActions.loadClass(getClass(), handlerClassName); if (clazz == null) throw new RuntimeException(ErrorCodes.CLASS_NOT_LOADED + handlerClassName); WSTrustRequestHandler handler = (WSTrustRequestHandler) clazz.newInstance(); handler.initialize(configuration); return handler; } catch (Exception e) { throw new RuntimeException(e.getMessage(), e); } }
/** * <p> * Constructs and returns a {@code SecurityTokenProvider} from the specified class name. * </p> * * @param providerClass the FQN of the {@code SecurityTokenProvider} to be instantiated. * @param properties a {@code Map<String, String>} containing the properties that have been configured for the * token provider. * @return a reference to the constructed {@code SecurityTokenProvider} object. */ public SecurityTokenProvider createTokenProvider(String providerClass, Map<String, String> properties) { try { Class<?> clazz = SecurityActions.loadClass(getClass(), providerClass); if (clazz == null) throw new RuntimeException(ErrorCodes.CLASS_NOT_LOADED + providerClass); SecurityTokenProvider tokenProvider = (SecurityTokenProvider) clazz.newInstance(); tokenProvider.initialize(properties); return tokenProvider; } catch (Exception pae) { throw new RuntimeException(ErrorCodes.CANNOT_CREATE_INSTANCE + providerClass, pae); } }
/** * <p> * Constructs and returns the {@code WSTrustRequestHandler} that will be used to handle WS-Trust requests. * </p> * * @param configuration a reference to the {@code STSConfiguration}. * @return a reference to the constructed {@code WSTrustRequestHandler} object. */ public WSTrustRequestHandler createRequestHandler(String handlerClassName, STSConfiguration configuration) { try { Class<?> clazz = SecurityActions.loadClass(getClass(), handlerClassName); if (clazz == null) throw logger.classNotLoadedError(handlerClassName); WSTrustRequestHandler handler = (WSTrustRequestHandler) clazz.newInstance(); handler.initialize(configuration); return handler; } catch (Exception e) { throw new RuntimeException(e.getMessage(), e); } }
/** * <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); } } }
/** * <p> * Constructs and returns the {@code WSTrustRequestHandler} that will be used to handle WS-Trust requests. * </p> * * @param configuration a reference to the {@code STSConfiguration}. * * @return a reference to the constructed {@code WSTrustRequestHandler} object. */ public WSTrustRequestHandler createRequestHandler(String handlerClassName, STSConfiguration configuration) { try { Class<?> clazz = SecurityActions.loadClass(getClass(), handlerClassName); if (clazz == null) throw logger.classNotLoadedError(handlerClassName); WSTrustRequestHandler handler = (WSTrustRequestHandler) clazz.newInstance(); handler.initialize(configuration); return handler; } catch (Exception e) { throw new RuntimeException(e.getMessage(), e); } }
/** * <p> * Constructs and returns the {@code WSTrustRequestHandler} that will be used to handle WS-Trust requests. * </p> * * @param configuration a reference to the {@code STSConfiguration}. * * @return a reference to the constructed {@code WSTrustRequestHandler} object. */ public WSTrustRequestHandler createRequestHandler(String handlerClassName, STSConfiguration configuration) { try { Class<?> clazz = SecurityActions.loadClass(getClass(), handlerClassName); if (clazz == null) throw logger.classNotLoadedError(handlerClassName); WSTrustRequestHandler handler = (WSTrustRequestHandler) clazz.newInstance(); handler.initialize(configuration); return handler; } catch (Exception e) { throw new RuntimeException(e.getMessage(), e); } }
/** * <p> * Constructs and returns a {@code SecurityTokenProvider} from the specified class name. * </p> * * @param providerClass the FQN of the {@code SecurityTokenProvider} to be instantiated. * @param properties a {@code Map<String, String>} containing the properties that have been configured for the token * provider. * @return a reference to the constructed {@code SecurityTokenProvider} object. */ public SecurityTokenProvider createTokenProvider(String providerClass, Map<String, String> properties) { try { Class<?> clazz = SecurityActions.loadClass(getClass(), providerClass); if (clazz == null) throw logger.classNotLoadedError(providerClass); SecurityTokenProvider tokenProvider = (SecurityTokenProvider) clazz.newInstance(); tokenProvider.initialize(properties); return tokenProvider; } catch (Exception pae) { throw new RuntimeException(logger.couldNotCreateInstance(providerClass, pae)); } }
/** * <p> * Constructs and returns a {@code SecurityTokenProvider} from the specified class name. * </p> * * @param providerClass the FQN of the {@code SecurityTokenProvider} to be instantiated. * @param properties a {@code Map<String, String>} containing the properties that have been configured for the * token * provider. * * @return a reference to the constructed {@code SecurityTokenProvider} object. */ public SecurityTokenProvider createTokenProvider(String providerClass, Map<String, String> properties) { try { Class<?> clazz = SecurityActions.loadClass(getClass(), providerClass); if (clazz == null) throw logger.classNotLoadedError(providerClass); SecurityTokenProvider tokenProvider = (SecurityTokenProvider) clazz.newInstance(); tokenProvider.initialize(properties); return tokenProvider; } catch (Exception pae) { throw new RuntimeException(logger.couldNotCreateInstance(providerClass, pae)); } }
/** * <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)); } } }
/** * <p> * Constructs and returns a {@code SecurityTokenProvider} from the specified class name. * </p> * * @param providerClass the FQN of the {@code SecurityTokenProvider} to be instantiated. * @param properties a {@code Map<String, String>} containing the properties that have been configured for the * token * provider. * * @return a reference to the constructed {@code SecurityTokenProvider} object. */ public SecurityTokenProvider createTokenProvider(String providerClass, Map<String, String> properties) { try { Class<?> clazz = SecurityActions.loadClass(getClass(), providerClass); if (clazz == null) throw logger.classNotLoadedError(providerClass); SecurityTokenProvider tokenProvider = (SecurityTokenProvider) clazz.newInstance(); tokenProvider.initialize(properties); return tokenProvider; } catch (Exception pae) { throw new RuntimeException(logger.couldNotCreateInstance(providerClass, pae)); } }
/** * <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)); } } }
/** * <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)); } } }