Skip to content

Commit

Permalink
fix api with annoying rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
Schrank committed Apr 4, 2020
1 parent de209c4 commit f78aef1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The same problem exists but can not be fixed with the ugly hack. If you have a f

## For Developers

We have overwritten no classes.
We have overwritten only Mage_Api_Model_User, because we need to replace the new functionality in 1.9.4.4.

We changed the encryption model in global/helpers/core/encryption_model and use a few events to replaces the passwords after login. This is configurable, have a look at the settings.

Expand Down
11 changes: 11 additions & 0 deletions app/code/community/Ikonoshirt/Pbkdf2/Model/Api/User.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

declare(strict_types=1);

class Ikonoshirt_Pbkdf2_Model_Api_User extends Mage_Api_Model_User
{
protected function _getEncodedApiKey($apiKey)
{
return Mage::helper('core')->getHash($apiKey);
}
}
6 changes: 5 additions & 1 deletion app/code/community/Ikonoshirt/Pbkdf2/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
<ikonoshirt_pbkdf2>
<class>Ikonoshirt_Pbkdf2_Model</class>
</ikonoshirt_pbkdf2>
<api>
<rewrite>
<user>Ikonoshirt_Pbkdf2_Model_Api_User</user>
</rewrite>
</api>
</models>
<resources>
<pbkdf2_setup>
Expand Down Expand Up @@ -104,4 +109,3 @@
</suite>
</phpunit>
</config>

0 comments on commit f78aef1

Please sign in to comment.