API Key and secret Key!!

edited November 2011 in Modules
I am not sure if any one has tried this. I want users to program to the platform we are building.Typically you need ability to have some sort of Api key, secret key defined for the user. Then expose some of the features in the system as an API level.

Wanted some inputs/thoughts if any one has done it before.

sid

Comments

  • edited 11:31AM
    Can some one share some ideas as to how this can be accomplished.
    If we have to expose some functionality via RESTFUL API or Client library.

    sid
  • edited 11:31AM
    Phil Sturgeon has a tutorial on building a RESTful API with CodeIgniter if you haven't seen it yet and may be a good place to start:
    http://net.tutsplus.com/tutorials/php/working-with-restful-services-in-codeigniter-2/
  • edited 11:31AM
    Yes - I looked at this over now. Thank you.

    One question : Is there a way we could write pass the fuel_users model back to a controller extended by REST_Controller (CI_Controller)?

    That way I do not need to duplicate the code - rather just use what already exists and build on top and extend.

    Another option is to write the controller REST_Module CONTROLLER extends REST controller and try loading the fuel users module. But that throws some weird errors.
  • edited 11:31AM
    Do you have any additional information on how you want to use the REST controller and the fuel users module? You may already know this but you can load the fuel users model like so in the controller:
    $this->load->module_model(FUEL_FOLDER, 'users_model');
    You can then access it in your controller like any other model (e.g. $this->users_model...)
Sign In or Register to comment.