cancel
Showing results for 
Search instead for 
Did you mean: 

A custom authentication for a customer

A custom authentication for a customer

Hey all,  I need to use my own custom auth instead of Magento's default authentication, can anyone tell me if this scenario is supported?

2 REPLIES 2

Re: A custom authentication for a customer

Hello @alex_choroshin 

 

yes possible but you need to customize for that same like magento doing for customer token.

 

Otherwise do like this pass as one key as fix and compare with that.

 

Hope it will help you.


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: A custom authentication for a customer

Hi @alex_choroshin 


Yes, we can create a custom authentication by using API. Here is the scenario might work for you. You can create custom ACL(acl.xml) and put some rules there in the file. Also in case you need to use API create a webapi.xml file.

 

You can add below code in web.xml:

 

<route url="/V1/mymethod/show/:num1/:num2" method="GET">
<service class="MyNamespace\CoreApi\Api\CoreApiInterface" method="show"/>
<resources>
<resource ref="[module name]::[acl rule id]"/>
</resources>
</route>

Replace MyNamespace, mymethod, module name and acl rule id in the above code.

 

I hope it will help you.

 

Thanks

--
If my answer is useful, please Accept as Solution & give Kudos

Thanks