05-02-2017, 05:21 AM
Hi,
I'm using codeigniter-restserver library.
My goal is to give access to other websites to get some data from my DB.
So I need to secure my connection and make sure the website(which is willing to share with) access to my API.
I was reading the documentation and I found we can use rest_valid_logins by using username and password. but the thing is I want to make dynamic access to websites. I need to store accesses in my Database.
Then I found X-API-KEY which can store the keys in my database and give access to requests.
I would like to add another authorization to make sure the key is using only for one website not many. I want to check 2 things at the same time like X-API-KEY with the Website domain name.
How should I make this happen?
Thanks guys
I'm using codeigniter-restserver library.
My goal is to give access to other websites to get some data from my DB.
So I need to secure my connection and make sure the website(which is willing to share with) access to my API.
I was reading the documentation and I found we can use rest_valid_logins by using username and password. but the thing is I want to make dynamic access to websites. I need to store accesses in my Database.
Then I found X-API-KEY which can store the keys in my database and give access to requests.
I would like to add another authorization to make sure the key is using only for one website not many. I want to check 2 things at the same time like X-API-KEY with the Website domain name.
How should I make this happen?
Thanks guys