3

Hi I have implemented an app in Ionic v1 with Symfony2 as server side.

the communication between app and server is being made by post ajax request.

I want to make secure the request services data in network which is posted from app to Symfony2.

//Login services request

{role: "ROLE PARENT", user: "8557988004", password: "12872"}

//response

MessageId: 1, email: "sunilrawat@indivar.com", name: "SATNAM SINGH HANSRA", roleName: "ROLE PARENT"}

I have some other pages in my app where I need to process payment as well.So can you please guide me how can I make each service data secure so that no one can tamper it.Because by default ionic convert each services in ajax using $http.post.

Thanks advance

Sunil Rawat
  • 709
  • 10
  • 41

2 Answers2

0

You will probably need to use some sort of Authentication in the headers. Have a look at Basic Auth as an example.

For a client to be able to make the http request they will require a username and password.

Of course this requires a server side implementation as well but unfortunately I am not familiar with symfony, so I'm afraid you will have eto dig in yourself :)

For making sure the data in the request has not been tampered, you can use a message authentication code. This can be implemented in several ways but here is a link that will get you familiar with the concept:

https://en.wikipedia.org/wiki/Message_authentication_code

Dimitrios Matanis
  • 896
  • 1
  • 6
  • 19
  • I did not get the exact solution for this. to prevent someone hack / tamper data on the way.can you please give some reference where I can chek it. – Sunil Rawat Nov 29 '17 at 04:36
  • I have updated my answer with information about message authentication codes. That is probably what you are after. – Dimitrios Matanis Dec 01 '17 at 12:24
0

For React-native I had made simple encryption plugin I used

https://github.com/BhavanPatel/react-native-simple-encryption for front end

side and my backend is on nodejs so I used

https://github.com/BhavanPatel/react-native-node-enc-dec/tree/master/Node this. Please check it..

if you want me to make it for ionic v1 than I will.

Bhavan Patel
  • 1,755
  • 1
  • 16
  • 30