continue; final String groupId = e.get(groupIdAttribute).getString(); if (ldapEntry == null) {
groups.add(cursor.get().get(configuration.getGroupNameAttribute()).getString()); Optional<SingularityUser> result = Optional.of(new SingularityUser(user, com.google.common.base.Optional.fromNullable(Strings.emptyToNull(userEntry.get(configuration.getUserNameAttribute()).getString())), com.google.common.base.Optional.fromNullable(Strings.emptyToNull(userEntry.get(configuration.getUserEmailAttribute()).getString())), groups));
/** * Get key version. * @throws LdapInvalidAttributeValueException e * @return key version */ public int getKeyVersion() throws LdapInvalidAttributeValueException { String keyVersionStr = entry.get(KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT).getString(); int keyVersion = Integer.parseInt(keyVersionStr); return keyVersion; }
/** * Get whether disabled. * @throws LdapInvalidAttributeValueException e * @return whether this krb5 account is disabled */ public boolean getDisabled() throws LdapInvalidAttributeValueException { String disabled = entry.get(KerberosAttribute.KRB5_ACCOUNT_DISABLED_AT).getString(); return Boolean.parseBoolean(disabled); }
protected String getOid( Entry entry ) throws LdapException { Attribute oid = entry.get( moidAT ); if ( oid == null ) { return null; } return oid.getString(); }
/** * Get kdc flags. * @throws LdapInvalidAttributeValueException e * @return kdc flags */ public int getKdcFlags() throws LdapInvalidAttributeValueException { String krb5KDCFlags = entry.get("krb5KDCFlags").getString(); return Integer.parseInt(krb5KDCFlags); }
/** * Get kdc flags. * @throws LdapInvalidAttributeValueException e * @return kdc flags */ public int getKdcFlags() throws LdapInvalidAttributeValueException { String krb5KDCFlags = entry.get("krb5KDCFlags").getString(); return Integer.parseInt(krb5KDCFlags); }
/** * Get whether locked. * @throws LdapInvalidAttributeValueException e * @return whether the krb5 account is locked */ public boolean getLocked() throws LdapInvalidAttributeValueException { String lockedOut = entry.get(KerberosAttribute.KRB5_ACCOUNT_LOCKEDOUT_AT).getString(); return Boolean.parseBoolean(lockedOut); }
private String getEntryAttributeAsString(final Entry entry, final String attributeName) throws LdapInvalidAttributeValueException { final Attribute attribute = entry.get(attributeName); String value = null; if (attribute != null) { value = attribute.getString(); } return value; }
/** * Get whether locked. * @throws LdapInvalidAttributeValueException e * @return whether the krb5 account is locked */ public boolean getLocked() throws LdapInvalidAttributeValueException { String lockedOut = entry.get(KerberosAttribute.KRB5_ACCOUNT_LOCKEDOUT_AT).getString(); return Boolean.parseBoolean(lockedOut); }
/** * Get key version. * @throws LdapInvalidAttributeValueException e * @return key version */ public int getKeyVersion() throws LdapInvalidAttributeValueException { String keyVersionStr = entry.get(KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT).getString(); int keyVersion = Integer.parseInt(keyVersionStr); return keyVersion; }
/** * Get whether disabled. * @throws LdapInvalidAttributeValueException e * @return whether this krb5 account is disabled */ public boolean getDisabled() throws LdapInvalidAttributeValueException { String disabled = entry.get(KerberosAttribute.KRB5_ACCOUNT_DISABLED_AT).getString(); return Boolean.parseBoolean(disabled); }
/** * Get principal name. * @throws LdapInvalidAttributeValueException e * @return principal name */ public PrincipalName getPrincipalName() throws LdapInvalidAttributeValueException { String principalNameStr = entry.get(KerberosAttribute.KRB5_PRINCIPAL_NAME_AT).getString(); PrincipalName principalName = new PrincipalName(principalNameStr); return principalName; }
/** * Get expire time. * @throws LdapInvalidAttributeValueException e * @throws ParseException e * @return the expire time */ public KerberosTime getExpireTime() throws LdapInvalidAttributeValueException, ParseException { String expirationTime = entry.get(KerberosAttribute.KRB5_ACCOUNT_EXPIRATION_TIME_AT).getString(); return createKerberosTime(expirationTime); }
/** * Get created time. * @throws LdapInvalidAttributeValueException e * @throws ParseException e * @return created time */ public KerberosTime getCreatedTime() throws LdapInvalidAttributeValueException, ParseException { String createTime = entry.get("createTimestamp").getString(); return createKerberosTime(createTime); }
/** * Get principal name. * @throws LdapInvalidAttributeValueException e * @return principal name */ public PrincipalName getPrincipalName() throws LdapInvalidAttributeValueException { String principalNameStr = entry.get(KerberosAttribute.KRB5_PRINCIPAL_NAME_AT).getString(); PrincipalName principalName = new PrincipalName(principalNameStr); return principalName; }
/** * Get created time. * @throws LdapInvalidAttributeValueException e * @throws ParseException e * @return created time */ public KerberosTime getCreatedTime() throws LdapInvalidAttributeValueException, ParseException { String createTime = entry.get("createTimestamp").getString(); return createKerberosTime(createTime); }
/** * Get expire time. * @throws LdapInvalidAttributeValueException e * @throws ParseException e * @return the expire time */ public KerberosTime getExpireTime() throws LdapInvalidAttributeValueException, ParseException { String expirationTime = entry.get(KerberosAttribute.KRB5_ACCOUNT_EXPIRATION_TIME_AT).getString(); return createKerberosTime(expirationTime); }
/** * Get the cookie from the entry */ private byte[] getCookie( Entry entry ) throws LdapInvalidAttributeValueException { String csn = entry.get( SchemaConstants.ENTRY_CSN_AT ).getString(); return LdapProtocolUtils.createCookie( consumerMsgLog.getId(), csn ); }