• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Create Acces tokens in rest apis codeignietr

#1
Hi,

 I want to create access tokens in codeigniter which will help from hacking or getting access to my webservices from others. Now im using basic authentication for rest apis. can anyone help me in creating access Tokens for rest apis. Thank you
Reply

#2
I think this involves having a shared secret key with the user, which is used to encrypt the instructions, so that your api sends the identifier for the user and the encrypted api instructions. This then makes sure the message is from the authenticated user and has not been messed with.

So really you are asking how to encrypt a string with a secret key. You can look here: http://php.net/manual/en/function.hash-hmac.php but to be honest I know next to nothing about security, so searching for an existing php library to do this for you might be advisable.

There seems to be lots of stuff about this online. It is not really a CI issue, but more about what you want to use CI for.

Paul.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.