{"issue":{"state":"open","created_at":"2011-12-07T22:10:22Z","updated_at":"2011-12-07T23:22:08Z","user":{"gravatar_id":"3a49f0b84e4bd5eb82dce9cb49b51c2b","id":6371,"url":"https://api.github.com/users/notbenh","login":"notbenh","avatar_url":"https://secure.gravatar.com/avatar/3a49f0b84e4bd5eb82dce9cb49b51c2b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":1,"body":"It seems that the current $config is global to all instances of REST_Controller, though we are building a public lite version of our API thus we want to just turn off authentication for one controller. ","assignee":null,"id":2480874,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[],"number":73,"title":"Is it possible to have one controller not auth?","html_url":"https://github.com/philsturgeon/codeigniter-restserver/issues/73","closed_at":null,"url":"https://api.github.com/repos/philsturgeon/codeigniter-restserver/issues/73","milestone":null},"action":"created","comment":{"created_at":"2011-12-07T23:22:08Z","updated_at":"2011-12-07T23:22:08Z","user":{"gravatar_id":"14ac90265ea3bc86acbfe98493e86b8d","id":532616,"url":"https://api.github.com/users/onema","login":"onema","avatar_url":"https://secure.gravatar.com/avatar/14ac90265ea3bc86acbfe98493e86b8d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"As far as I know there is no way to turn off authentication for one controller. I can see how having a public API can be useful, but keep in mind that you may be setting yourself up for trouble. I don't think there are many API's this days require no authentication. \r\n\r\nHow about giving your different controllers and methods a level of access? This has already been implemented and works great. In that way you can distribute keys that only have access to specific methods. Using keys you can even limit how many times a key access the api, or how many times a method can be accessed. \r\n\r\nYou can either:\r\n1) Use the \"methods\" array to manually set the method level and limit. Check the key.php example (under applications/controller/api/key.php) to see how this array is initialized.\r\n\r\n2) Create a table to keep track of your methods level of access and limits http://d.pr/xQBm, and initialize the \"methods\" array in the constructor of your controller.\r\n\r\nLet me know if you have trouble trying to work with this. I know I had trouble at first trying to figure it out. ","id":3055282,"url":"https://api.github.com/repos/philsturgeon/codeigniter-restserver/issues/comments/3055282"}}