Laravel - Matriz Card Authentication

laravel Dec 05, 2017

All of us have some customers with specific requests to their applications and some how, they expect more and more..

In this case, we will see the construction of a Matriz Card Authentication just like banks do to their customers on their login and to proccess actions on their bank account.

In this request, the customer needs to login with username and password and then validate coordinates of a card that was generated just for him.

Bank CGD Matriz Card Example

This is a simple example of a Matriz Card from a Portuguese Bank (CGD). In this example, as you can see, it's requested to type:

Coordinate B6 > 1st number position
Coordinate B1 > 2nd number position
Coordinate E5 > 2nd number position

So, basically, we just need to pick the content of that inputs and compare with a json, our Matriz Card in database.

{ "A1":"121", "A2":"213" , "A3":"345", "A4":"154", "A5":"735", "A6":"174", "B1":"736", "B2":"939", "B3":"013", "B4":"638", "B5":"729", "B6":"341", "C1":"829", "C2":"635", "C3":"339", "C4":"413", "C5":"525", "C6":"206", .. "E1":"120", "E2":"134", "E3":"860", "E3":"151", "E4":"462", "E5":"224" }

In this example, we are only using at letter D, however, you can change the coordinate to numbers or just increase the number of options. Be creative :)