/** * {@inheritDoc} */ @Override public Class<?> findClass( String name ) throws ClassNotFoundException { byte[] classBytes; try { classBytes = javaByteCodeAttr.getBytes(); } catch ( LdapException e ) { throw new ClassNotFoundException(); } return defineClass( name, classBytes, 0, classBytes.length ); } }
/** * Return the image stored on the entry. * * @param entry contains the image target. * @param attributeName to be retrieved. * @return byte array containing image. * @throws LdapInvalidAttributeValueException contains the system error. */ protected byte[] getPhoto( Entry entry, String attributeName ) throws LdapInvalidAttributeValueException { byte[] photo = null; Attribute attr = entry.get( attributeName ); if ( attr != null ) { photo = attr.getBytes(); } return photo; }
byte[] data = ( byte[] ) serverEntry.get( JSERIALDATA_ATTR ).getBytes(); in = new ObjectInputStream( new ByteArrayInputStream( data ) );
syncCookie = attr.getBytes(); lastSavedCookie = syncCookie; String syncCookieString = Strings.utf8ToString( syncCookie );
byteCodeStr = new String( Base64.encode( byteCode.getBytes() ) );
byteCodeStr = new String( Base64.encode( byteCode.getBytes() ) );
byteCodeStr = new String( Base64.encode( byteCode.getBytes() ) );
byteCodeStr = new String( Base64.encode( byteCode.getBytes() ) );
byteCodeStr = new String( Base64.encode( byteCode.getBytes() ) );
byteCodeStr = new String( Base64.encode( byteCode.getBytes() ) );
byteCodeStr = new String( Base64.encode( byteCode.getBytes() ) );
return classEntry.get( "javaClassByteCode" ).getBytes();
private PwdModDetailsHolder getPwdModDetails( ModifyOperationContext modifyContext, PasswordPolicyConfiguration policyConfig ) throws LdapException { PwdModDetailsHolder pwdModDetails = new PwdModDetailsHolder(); List<Modification> mods = modifyContext.getModItems(); for ( Modification m : mods ) { Attribute at = m.getAttribute(); AttributeType passwordAttribute = schemaManager.lookupAttributeTypeRegistry( policyConfig.getPwdAttribute() ); if ( at.getAttributeType().equals( passwordAttribute ) ) { pwdModDetails.setPwdModPresent( true ); ModificationOperation op = m.getOperation(); if ( op == REMOVE_ATTRIBUTE ) { pwdModDetails.setDelete( true ); } else if ( op == REPLACE_ATTRIBUTE || op == ADD_ATTRIBUTE ) { pwdModDetails.setAddOrReplace( true ); pwdModDetails.setNewPwd( at.getBytes() ); } } else { pwdModDetails.setOtherModExists( true ); } } return pwdModDetails; }
entry.getDn(), AuthenticationLevel.STRONG, entry.get( SchemaConstants.USER_PASSWORD_AT ).getBytes() ); ldapSession.putSaslProperty( SaslConstants.SASL_AUTHENT_USER, ldapPrincipal );
entry.getDn(), AuthenticationLevel.STRONG, entry.get( SchemaConstants.USER_PASSWORD_AT ).getBytes() ); ldapSession.putSaslProperty( SaslConstants.SASL_AUTHENT_USER, ldapPrincipal );
if (PasswordUtil.compareCredentials(pwd.getBytes(), entry.get("userpassword").getBytes())) { return true; } else {
if (PasswordUtil.compareCredentials(pwd.getBytes(), entry.get("userpassword").getBytes())) { return true; } else {
anonymizedAva = new Ava( schemaManager, ava.getType(), anonymizedAttribute.getBytes() );
anonymizedAva = new Ava( schemaManager, ava.getType(), anonymizedAttribute.getBytes() );
anonymizedAva = new Ava( schemaManager, ava.getType(), anonymizedAttribute.getBytes() );