/** * Returns the <code>byte[]</code> used to create this buffer, or * getComputedBytes() if created with a <code>char[]</code>. * * @return A byte[] */ public byte[] getBytes() { return originalBytes == null ? getComputedBytes() : originalBytes; }
/** * Returns the <code>byte[]</code> used to create this buffer, or * getComputedBytes() if created with a <code>char[]</code>. * * @return A byte[] */ public byte[] getBytes() { return originalBytes == null ? getComputedBytes() : originalBytes; }
/** * Returns the <code>byte[]</code> used to create this buffer, or * getComputedBytes() if created with a <code>char[]</code>. * * @return A byte[] */ public byte[] getBytes() { return originalBytes == null ? getComputedBytes() : originalBytes; }
@Override public ResultResponse process() throws PasswordException, LdapException { // Can't use Password Modify: // https://issues.apache.org/jira/browse/DIRSERVER-1935 // So revert to regular Modify MemoryClearingBuffer newPasswordBuffer = MemoryClearingBuffer.newInstance( newPassword ); try { ModifyRequest modifyRequest = new ModifyRequestImpl() .setName( userDn ) .replace( "userPassword", newPasswordBuffer.getComputedBytes() ) .addControl( passwordPolicyRequestControl ); return connection.modify( modifyRequest ); } finally { newPasswordBuffer.clear(); } } } );
@Override public ResultResponse process() throws PasswordException, LdapException { // Can't use Password Modify: // https://issues.apache.org/jira/browse/DIRSERVER-1935 // So revert to regular Modify MemoryClearingBuffer newPasswordBuffer = MemoryClearingBuffer.newInstance( newPassword ); try { ModifyRequest modifyRequest = new ModifyRequestImpl() .setName( userDn ) .replace( "userPassword", newPasswordBuffer.getComputedBytes() ) .addControl( passwordPolicyRequestControl ); return connection.modify( modifyRequest ); } finally { newPasswordBuffer.clear(); } } } );
@Override public ResultResponse process() throws PasswordException, LdapException { // Can't use Password Modify: // https://issues.apache.org/jira/browse/DIRSERVER-1935 // So revert to regular Modify MemoryClearingBuffer newPasswordBuffer = MemoryClearingBuffer.newInstance( newPassword ); try { ModifyRequest modifyRequest = new ModifyRequestImpl() .setName( userDn ) .replace( "userPassword", newPasswordBuffer.getComputedBytes() ) .addControl( passwordPolicyRequestControl ); return connection.modify( modifyRequest ); } finally { newPasswordBuffer.clear(); } } } );