org.wso2.carbon.identity.application.common.model.Property.getValue()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(11.2k)|赞(0)|评价(0)|浏览(84)

本文整理了Java中org.wso2.carbon.identity.application.common.model.Property.getValue()方法的一些代码示例,展示了Property.getValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Property.getValue()方法的具体详情如下:
包路径:org.wso2.carbon.identity.application.common.model.Property
类名称:Property
方法名:getValue

Property.getValue介绍

暂无

代码示例

代码示例来源:origin: wso2/carbon-identity-framework

/**
   * Checks whether given property is not null and property value is not blank
   * @param property
   * @return boolean
   */
  public boolean isValidPropertyValue (Property property){
    return property != null && StringUtils.isNotBlank(property.getValue());
  }
}

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.application.common

public static String getPropertyValue(Property[] properties, String propertyName) {

    Property property = getProperty(properties, propertyName);
    if (property != null) {
      if (StringUtils.isNotBlank(property.getValue())) {
        return property.getValue();
      }
    }
    return null;
  }
}

代码示例来源:origin: wso2/carbon-identity-framework

public static String getPropertyValue(Property[] properties, String propertyName) {
  Property property = getProperty(properties, propertyName);
  if (property != null) {
    if (StringUtils.isNotBlank(property.getValue())) {
      return property.getValue();
    }
  }
  return null;
}

代码示例来源:origin: org.wso2.carbon.identity.framework/org.wso2.carbon.identity.application.authentication.framework

private boolean isAccountDisablingEnabled(String tenantDomain) throws FrameworkException {
  Property accountDisableConfigProperty = FrameworkUtils.getResidentIdpConfiguration(
      ACCOUNT_DISABLE_HANDLER_ENABLE_PROPERTY, tenantDomain);
  return accountDisableConfigProperty != null && Boolean.parseBoolean(accountDisableConfigProperty.getValue());
}

代码示例来源:origin: wso2/carbon-identity-framework

private List<Property> filterEmptyProperties(Property[] propertiesArray) {
  List<Property> propertyArrayList = new ArrayList<>();
  if (ArrayUtils.isNotEmpty(propertiesArray)) {
    for (Property property : propertiesArray) {
      if (property != null && StringUtils.isNotBlank(property.getValue())) {
        propertyArrayList.add(property);
      }
    }
  }
  return propertyArrayList;
}
/**

代码示例来源:origin: org.wso2.carbon.identity.framework/org.wso2.carbon.identity.application.authentication.framework

private boolean isAccountLockingEnabled(String tenantDomain) throws FrameworkException {
  Property accountLockConfigProperty = FrameworkUtils.getResidentIdpConfiguration(
      ACCOUNT_LOCK_HANDLER_ENABLE_PROPERTY, tenantDomain);
  return accountLockConfigProperty != null && Boolean.parseBoolean(accountLockConfigProperty.getValue());
}

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.application.mgt

private List<Property> filterEmptyProperties(Property[] propertiesArray){
  List<Property> propertyArrayList = new ArrayList<>();
  if(ArrayUtils.isNotEmpty(propertiesArray)) {
    for (Property property : propertiesArray) {
      if (property != null && StringUtils.isNotBlank(property.getValue())) {
        propertyArrayList.add(property);
      }
    }
  }
  return propertyArrayList ;
}
/**

代码示例来源:origin: wso2/carbon-identity-framework

private boolean isAccountDisablingEnabled(String tenantDomain) throws FrameworkException {
  Property accountDisableConfigProperty = FrameworkUtils.getResidentIdpConfiguration(
      ACCOUNT_DISABLE_HANDLER_ENABLE_PROPERTY, tenantDomain);
  return accountDisableConfigProperty != null && Boolean.parseBoolean(accountDisableConfigProperty.getValue());
}

代码示例来源:origin: wso2/carbon-identity-framework

private boolean isAccountLockingEnabled(String tenantDomain) throws FrameworkException {
  Property accountLockConfigProperty = FrameworkUtils.getResidentIdpConfiguration(
      ACCOUNT_LOCK_HANDLER_ENABLE_PROPERTY, tenantDomain);
  return accountLockConfigProperty != null && Boolean.parseBoolean(accountLockConfigProperty.getValue());
}

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.provisioning.connector.spml

@Override
public void init(Property[] provisioningProperties) throws IdentityProvisioningException {
  Properties configs = new Properties();
  if (provisioningProperties != null && provisioningProperties.length > 0) {
    for (Property property : provisioningProperties) {
      configs.put(property.getName(), property.getValue());
      if (IdentityProvisioningConstants.JIT_PROVISIONING_ENABLED.equals(property
          .getName()) && "1".equals(property.getValue())){
        jitProvisioningEnabled = true;
      }
    }
  }
  configHolder = new SPMLProvisioningConnectorConfig(configs);
}

代码示例来源:origin: org.wso2.carbon.identity.outbound.provisioning.scim2/org.wso2.carbon.identity.provisioning.connector.scim2

/**
 * Populates the SCIM Provider.
 *
 * @param property
 * @param scimPropertyName
 * @throws IdentityProvisioningException
 */
private void populateSCIMProvider(Property property, String scimPropertyName)
    throws IdentityProvisioningException {
  if (StringUtils.isNotEmpty(property.getValue())) {
    scimProvider.setProperty(scimPropertyName, property.getValue());
  } else if (StringUtils.isNotEmpty(property.getDefaultValue())) {
    scimProvider.setProperty(scimPropertyName, property.getDefaultValue());
  }
}

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.governance

public void updateConfigurations (Property[] configurations) throws IdentityGovernanceException {
  String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
  identityGovernanceService = new IdentityGovernanceServiceImpl();
  Map<String, String> confMap = new HashMap<>();
  for (Property configuration : configurations) {
    confMap.put(configuration.getName(), configuration.getValue());
  }
  identityGovernanceService.updateConfiguration(tenantDomain, confMap);
}

代码示例来源:origin: org.wso2.carbon.identity.metadata.saml2/org.wso2.carbon.identity.outbound.metadata.saml2

public void buildSingleLogOutService(IDPSSODescriptor idpSsoDesc,
    FederatedAuthenticatorConfig samlFederatedAuthenticatorConfig) throws MetadataException {
  SingleLogoutService sloServiceDesc = BuilderUtil
      .createSAMLObject(ConfigElements.FED_METADATA_NS, ConfigElements.SLOSERVICE_DESCRIPTOR, "");
  sloServiceDesc.setBinding(IDPMetadataConstant.HTTP_BINDING_REDIRECT_SAML2);
  sloServiceDesc.setLocation(getFederatedAuthenticatorConfigProperty(samlFederatedAuthenticatorConfig,
      IdentityApplicationConstants.Authenticator.SAML2SSO.LOGOUT_REQ_URL).getValue());
  sloServiceDesc.setResponseLocation(getFederatedAuthenticatorConfigProperty(samlFederatedAuthenticatorConfig,
      IdentityApplicationConstants.Authenticator.SAML2SSO.LOGOUT_REQ_URL).getValue());
  idpSsoDesc.getSingleLogoutServices().add(sloServiceDesc);
}

代码示例来源:origin: org.wso2.carbon.identity.inbound.auth.oauth2/org.wso2.carbon.identity.oauth

private String getIdpEntityId(FederatedAuthenticatorConfig[] fedAuthnConfigs) {
  String idpEntityId = null;
  // Get SAML authenticator
  FederatedAuthenticatorConfig samlAuthenticatorConfig =
      IdentityApplicationManagementUtil.getFederatedAuthenticator(fedAuthnConfigs,
          IdentityApplicationConstants.Authenticator.SAML2SSO.NAME);
  // Get Entity ID from SAML authenticator
  Property samlProperty = IdentityApplicationManagementUtil.getProperty(
      samlAuthenticatorConfig.getProperties(),
      IdentityApplicationConstants.Authenticator.SAML2SSO.IDP_ENTITY_ID);
  if (samlProperty != null) {
    idpEntityId = samlProperty.getValue();
  }
  return idpEntityId;
}

代码示例来源:origin: org.wso2.carbon.identity.governance/org.wso2.carbon.identity.governance

public void updateConfigurations(Property[] configurations) throws IdentityGovernanceException {
  String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
  IdentityGovernanceService identityGovernanceService = IdentityMgtServiceDataHolder.getInstance()
      .getIdentityGovernanceService();
  Map<String, String> confMap = new HashMap<>();
  for (Property configuration : configurations) {
    confMap.put(configuration.getName(), configuration.getValue());
  }
  identityGovernanceService.updateConfiguration(tenantDomain, confMap);
}

代码示例来源:origin: org.wso2.carbon.identity.metadata.saml2/org.wso2.carbon.identity.outbound.metadata.saml2

public EntityDescriptor buildEntityDescriptor(FederatedAuthenticatorConfig samlFederatedAuthenticatorConfig)
    throws MetadataException {
  EntityDescriptor entityDescriptor = BuilderUtil
      .createSAMLObject(ConfigElements.FED_METADATA_NS, ConfigElements.ENTITY_DESCRIPTOR, "");
  entityDescriptor.setEntityID(getFederatedAuthenticatorConfigProperty(samlFederatedAuthenticatorConfig,
      IdentityApplicationConstants.Authenticator.SAML2SSO.IDP_ENTITY_ID).getValue());
  entityDescriptor.setNoNamespaceSchemaLocation("");
  return entityDescriptor;
}

代码示例来源:origin: org.wso2.carbon.identity.governance/org.wso2.carbon.identity.recovery

public static String getSignUpConfigs(String key, String tenantDomain) throws IdentityRecoveryServerException {
  try {
    Property[] connectorConfigs;
    IdentityGovernanceService identityGovernanceService = IdentityRecoveryServiceDataHolder.getInstance()
        .getIdentityGovernanceService();
    connectorConfigs = identityGovernanceService.getConfiguration(new String[]{key,}, tenantDomain);
    return connectorConfigs[0].getValue();
  } catch (IdentityGovernanceException e) {
    throw Utils.handleServerException(IdentityRecoveryConstants.ErrorMessages.ERROR_CODE_ISSUE_IN_LOADING_SIGNUP_CONFIGS, null, e);
  }
}

代码示例来源:origin: org.wso2.carbon.identity.governance/org.wso2.carbon.identity.recovery

public static String getConnectorConfig(String key, String tenantDomain) throws IdentityEventException {
  try {
    Property[] connectorConfigs;
    IdentityGovernanceService identityGovernanceService = IdentityRecoveryServiceDataHolder.getInstance()
        .getIdentityGovernanceService();
    connectorConfigs = identityGovernanceService.getConfiguration(new String[]{key,}, tenantDomain);
    return connectorConfigs[0].getValue();
  } catch (IdentityGovernanceException e) {
    throw new IdentityEventException("Error while getting connector configurations", e);
  }
}

代码示例来源:origin: org.wso2.carbon.identity.metadata.saml2/org.wso2.carbon.identity.outbound.metadata.saml2

public void buildSingleSignOnService(IDPSSODescriptor idpSsoDesc,
    FederatedAuthenticatorConfig samlFederatedAuthenticatorConfig) throws MetadataException {
  SingleSignOnService ssoHTTPPost = BuilderUtil
      .createSAMLObject(ConfigElements.FED_METADATA_NS, ConfigElements.SSOSERVICE_DESCRIPTOR, "");
  ssoHTTPPost.setBinding(IDPMetadataConstant.HTTP_BINDING_POST_SAML2);
  ssoHTTPPost.setLocation(
      getFederatedAuthenticatorConfigProperty(samlFederatedAuthenticatorConfig, IdentityApplicationConstants.Authenticator.SAML2SSO.SSO_URL)
          .getValue());
  idpSsoDesc.getSingleSignOnServices().add(ssoHTTPPost);
  SingleSignOnService ssoHTTPRedirect = BuilderUtil
      .createSAMLObject(ConfigElements.FED_METADATA_NS, ConfigElements.SSOSERVICE_DESCRIPTOR, "");
  ssoHTTPRedirect.setBinding(IDPMetadataConstant.HTTP_BINDING_REDIRECT_SAML2);
  ssoHTTPRedirect.setLocation(
      getFederatedAuthenticatorConfigProperty(samlFederatedAuthenticatorConfig, IdentityApplicationConstants.Authenticator.SAML2SSO.SSO_URL)
          .getValue());
  idpSsoDesc.getSingleSignOnServices().add(ssoHTTPRedirect);
}

代码示例来源:origin: org.wso2.carbon.identity.inbound.auth.oauth2/org.wso2.carbon.identity.oauth

public static String getIdTokenIssuer(String tenantDomain) throws IdentityOAuth2Exception {
  IdentityProvider identityProvider = getResidentIdp(tenantDomain);
  FederatedAuthenticatorConfig[] fedAuthnConfigs = identityProvider.getFederatedAuthenticatorConfigs();
  // Get OIDC authenticator
  FederatedAuthenticatorConfig oidcAuthenticatorConfig =
      IdentityApplicationManagementUtil.getFederatedAuthenticator(fedAuthnConfigs,
          IdentityApplicationConstants.Authenticator.OIDC.NAME);
  return IdentityApplicationManagementUtil.getProperty(oidcAuthenticatorConfig.getProperties(),
      IDP_ENTITY_ID).getValue();
}

相关文章