Midrub Api Introduction
The Midrub Api use the Oauth 2.0 concept but i'm not using any external library for this. I've invented my way to allow Api using in dynamic way with all Midrub's components.
In the next Midrub's update i'm going to improve the Midrub's Api and after i will write more articles about the Api use. It's simple and is similar to other services Api.
The Midrub's Api has two ways to be used:
- For mobile apps with predefined permissions. Redirects are not required.
- For web use where users should approve the use of permissions, Redirects are required.
All ways has same creation process, but in web use redirects are required:
The endpoints which support post requests, should be added in the config.php file.
For example you can have this in config.php:
$config['csrf_exclude_uris'] = array();
If your endpoint has post's request support, add
$config['csrf_exclude_uris'] = array('your endpoint without main url');
$config['csrf_exclude_uris'] = array('rest-app/posts/create_post');
The Midrub Api requires attention on details.