All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.internet2.middleware.grouperDuo.DuoGrouperExternalSystem Maven / Gradle / Ivy

There is a newer version: 5.13.5
Show newest version
package edu.internet2.middleware.grouperDuo;

import java.util.List;

import org.apache.commons.lang3.StringUtils;

import edu.internet2.middleware.grouper.app.duo.GrouperDuoApiCommands;
import edu.internet2.middleware.grouper.app.externalSystem.GrouperExternalSystem;
import edu.internet2.middleware.grouper.cfg.dbConfig.ConfigFileName;

public class DuoGrouperExternalSystem extends GrouperExternalSystem {
  
  @Override
  public ConfigFileName getConfigFileName() {
    return ConfigFileName.GROUPER_PROPERTIES;
  }

  @Override
  public String getConfigItemPrefix() {
    if (StringUtils.isBlank(this.getConfigId())) {
      throw new RuntimeException("Must have configId!");
    }
    return "grouper.duoConnector." + this.getConfigId() + ".";
  }

  @Override
  public String getConfigIdRegex() {
    return "^(grouper\\.duoConnector)\\.([^.]+)\\.(.*)$";
  }
  
  @Override
  public String getConfigIdThatIdentifiesThisConfig() {
    return "myConnector";
  }

  @Override
  public List test() throws UnsupportedOperationException {
    
    GrouperDuoApiCommands.retrieveDuoGroup(this.getConfigId(), "abc123");
    return null;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy