@Override public boolean supports(Class<?> entityType) { MappedAttribute mappedAttribute = entityType.getAnnotation(MappedAttribute.class); return mappedAttribute != null && !isNullOrEmpty(mappedAttribute.value()); }
private String getWorkingDir() { String workingDir = this.configuration.getWorkingDir(); if (isNullOrEmpty(workingDir)) { workingDir = DEFAULT_WORKING_DIR; } return workingDir; }
public SamlCredential(final String assertion) { if (StringUtil.isNullOrEmpty(assertion)) throw logger.nullArgumentError("assertion"); this.assertion = assertion; }
private String getSignatureMethod() { Object parameter = this.handlerConfig.getParameter(SIGN_METHOD); return parameter != null && !isNullOrEmpty(parameter.toString()) ? parameter.toString() : null; }
public TOTPCredential(String password, String secret) { super(password); if (isNullOrEmpty(secret)) { throw IDMMessages.MESSAGES.nullArgument("TOTP secret."); } this.secret = secret; }
private void initHostedURI() { String hostedURI = this.idpConfiguration.getHostedURI(); if (isNullOrEmpty(hostedURI)) { hostedURI = "/hosted/"; } else if (!hostedURI.contains(".") && !hostedURI.endsWith("/")) { // make sure the hosted uri have a slash at the end if it points to a directory hostedURI = hostedURI + "/"; } this.idpConfiguration.setHostedURI(hostedURI); }
private void initHostedURI(IDPType idpConfiguration) { String hostedURI = idpConfiguration.getHostedURI(); if (isNullOrEmpty(hostedURI)) { hostedURI = "/hosted/"; } else if (!hostedURI.contains(".") && !hostedURI.endsWith("/")) { // make sure the hosted uri have a slash at the end if it points to a directory hostedURI = hostedURI + "/"; } idpConfiguration.setHostedURI(hostedURI); }
private void initHostedURI() { String hostedURI = this.idpConfiguration.getHostedURI(); if (isNullOrEmpty(hostedURI)) { hostedURI = "/hosted/"; } else if (!hostedURI.contains(".") && !hostedURI.endsWith("/")) { // make sure the hosted uri have a slash at the end if it points to a directory hostedURI = hostedURI + "/"; } this.idpConfiguration.setHostedURI(hostedURI); }
private void initHostedURI(IDPType idpConfiguration) { String hostedURI = idpConfiguration.getHostedURI(); if (isNullOrEmpty(hostedURI)) { hostedURI = "/hosted/"; } else if (!hostedURI.contains(".") && !hostedURI.endsWith("/")) { // make sure the hosted uri have a slash at the end if it points to a directory hostedURI = hostedURI + "/"; } idpConfiguration.setHostedURI(hostedURI); }
private void initHostedURI() { String hostedURI = this.idpConfiguration.getHostedURI(); if (isNullOrEmpty(hostedURI)) { hostedURI = "/hosted/"; //$NON-NLS-1$ } else if (!hostedURI.contains(".") && !hostedURI.endsWith("/")) { //$NON-NLS-1$ //$NON-NLS-2$ // make sure the hosted uri have a slash at the end if it points to a directory hostedURI = hostedURI + "/"; //$NON-NLS-1$ } this.idpConfiguration.setHostedURI(hostedURI); }
private void initHostedURI(IDPType idpConfiguration) { String hostedURI = idpConfiguration.getHostedURI(); if (isNullOrEmpty(hostedURI)) { hostedURI = "/hosted/"; } else if (!hostedURI.contains(".") && !hostedURI.endsWith("/")) { // make sure the hosted uri have a slash at the end if it points to a directory hostedURI = hostedURI + "/"; } idpConfiguration.setHostedURI(hostedURI); }
public void removeTrustDomain(String domain) { String domainsList = getDomains(); if (!isNullOrEmpty(domainsList)) { getTrust().setDomains(""); for (String currentDomain : domainsList.split(",")) { if (!domain.equals(currentDomain) && !isNullOrEmpty(currentDomain)) { addTrustDomain(currentDomain); } } } }
public void removeTrustDomain(String domain) { String domainsList = getDomains(); if (!isNullOrEmpty(domainsList)) { getTrust().setDomains(""); for (String currentDomain : domainsList.split(",")) { if (!domain.equals(currentDomain) && !isNullOrEmpty(currentDomain)) { addTrustDomain(currentDomain); } } } }
public void addTrustDomain(String domain) { String domainsList = getDomains(); if (!isNullOrEmpty(domainsList)) { domainsList = domainsList + ","; } getTrust().setDomains(domainsList + domain); this.trustDomainAlias.put(domain.trim(), domain.trim()); }
public void addTrustDomain(String domain) { String domainsList = getDomains(); if (!isNullOrEmpty(domainsList)) { domainsList = domainsList + ","; } getTrust().setDomains(domainsList + domain); this.trustDomainAlias.put(domain.trim(), domain.trim()); }
@Override public void extractCredential(HttpServletRequest request, DefaultLoginCredentials creds) { if (isBasicAuthentication(request)) { String[] usernameAndPassword = extractUsernameAndPassword(request); String username = usernameAndPassword[0]; String password = usernameAndPassword[1]; if (!(StringUtil.isNullOrEmpty(username) && StringUtil.isNullOrEmpty(password))) { creds.setUserId(username); creds.setPassword(password); } } }
protected NamedIdentityConfigurationBuilder(String name, IdentityConfigurationBuilder builder) { super(builder); if (isNullOrEmpty(name)) { throw MESSAGES.nullArgument("Configuration name"); } this.identityStoresConfigurationBuilder = new IdentityStoresConfigurationBuilder(this); this.name = name; }
@Override public String getConfigurationName(IdentityContext identityContext, Partition partition) { EntityMapper entityMapper = getRootMapper(partition.getClass()); EntityManager entityManager = getEntityManager(identityContext); Object partitionEntity = entityManager.find(entityMapper.getEntityType(), partition.getId()); Property configurationNameProperty = entityMapper.getProperty(partition.getClass(), ConfigurationName.class).getValue(); String configurationName = configurationNameProperty.getValue(partitionEntity).toString(); if (isNullOrEmpty(configurationName)) { throw MESSAGES.partitionWithNoConfigurationName(partition); } return configurationName; }
@Override public String getConfigurationName(IdentityContext identityContext, Partition partition) { EntityMapper entityMapper = getRootMapper(partition.getClass()); EntityManager entityManager = getEntityManager(identityContext); Object partitionEntity = entityManager.find(entityMapper.getEntityType(), partition.getId()); Property configurationNameProperty = entityMapper.getProperty(partition.getClass(), ConfigurationName.class).getValue(); String configurationName = configurationNameProperty.getValue(partitionEntity).toString(); if (isNullOrEmpty(configurationName)) { throw MESSAGES.partitionWithNoConfigurationName(partition); } return configurationName; }
@Override public String getConfigurationName(IdentityContext identityContext, Partition partition) { FilePartition filePartition = resolve(partition.getClass(), partition.getName()); if (isNullOrEmpty(filePartition.getConfigurationName())) { throw MESSAGES.partitionWithNoConfigurationName(partition); } return filePartition.getConfigurationName(); }