/** * checks the collected valid options against the options passed in * Override when there are special needs like for the SimpleUsersLoginModule */ protected void checkOptions() { for (Object key : options.keySet()) { if (!validOptions.contains(key)) { PicketBoxLogger.LOGGER.warnInvalidModuleOption((String)key); } } } }
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) { /* TODO: this module should really extend AbstractServerLoginModule where the options check is integrated. * the code here has been intentionally kept identical */ HashSet<String> validOptions = new HashSet<String>(Arrays.asList(ALL_VALID_OPTIONS)); for (Object key : options.keySet()) { if (!validOptions.contains(key)) { PicketBoxLogger.LOGGER.warnInvalidModuleOption((String)key); } } securityDomain = (String) options.get(SecurityConstants.SECURITY_DOMAIN_OPTION); }
/** Look for the roleName option that specifies the role to use as the * run-as role. If not specified a default role name of nobody is used. */ public void initialize(Subject subject, CallbackHandler handler, Map<String,?> sharedState, Map<String,?> options) { /* TODO: this module should really extend AbstractServerLoginModule where the options check is integrated. * the code here has been intentionally kept identical */ HashSet<String> validOptions = new HashSet<String>(Arrays.asList(ALL_VALID_OPTIONS)); for (Object key : options.keySet()) { if (!validOptions.contains(key)) { PicketBoxLogger.LOGGER.warnInvalidModuleOption((String)key); } } roleName = (String) options.get(ROLE_NAME); if( roleName == null ) roleName = "nobody"; principalName = (String) options.get(PRINCIPLE_NAME); if( principalName == null ) principalName = "nobody"; }
PicketBoxLogger.LOGGER.warnInvalidModuleOption(key);
PicketBoxLogger.LOGGER.warnInvalidModuleOption((String) key);
PicketBoxLogger.LOGGER.warnInvalidModuleOption((String)key);
PicketBoxLogger.LOGGER.warnInvalidModuleOption((String)key);