Skip to content

Commit bc011eb

Browse files
authored
First release secure customer APi Magento 2
Module to close the create customer API Magento 2 to prevent spammers creating accounts
0 parents  commit bc011eb

3 files changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0"?>
2+
3+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
4+
<module name="Lotsofpixels_customerAPI" setup_version="1.0.0">
5+
</module>
6+
</config>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* Lots of Pixels Amsterdam
6+
*/
7+
-->
8+
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
10+
<route url="/V1/customers" method="POST">
11+
<service class="Magento\Customer\Api\AccountManagementInterface" method="createAccount"/>
12+
<resources>
13+
<resource ref="self"/>
14+
</resources>
15+
</route>
16+
17+
</routes>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
\Magento\Framework\Component\ComponentRegistrar::register(
3+
\Magento\Framework\Component\ComponentRegistrar::MODULE,
4+
'Lotsofpixels_customerAPI',
5+
__DIR__
6+
);

0 commit comments

Comments
 (0)