- Create a new project
- Make several pages and link to the menu, for example here I make the page name and menu :
premium
- Go to (IMAB) Back-End Configuration -» Back-End Configuration, then create the table, for example I give a name
premium
- When finished go to: (IMAB) Back-End Configuration -» PHP Native Generator, For the Enable Users & JWT Auth option please checked
- Now we need JWT Addons to create login and register menus, go to (IMAB) Add-ons -» JWT Auth,
for JWT Auth Type select PHP Native Generator and enter the Main URL (The URL of the hosting that is used for rest-api later)
for After Login Goto Page select Premium Page
and Premium Page rule select user
- Then upload backend to your hosting, go to: (IMAB) Back-End Configuration -» PHP Native Generator, Then download the Zip file and install to your hosting.
Most of the shared hosting has disabled the HTTP Authorization Header by default. To enable this option you'll need to edit your
.htaccess
file adding the follow:<IfModule mod_rewrite.c> # Add this code RewriteCond %{HTTP:Authorization} ^(.*) RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1] </IfModule> # And this code SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
And
your web must use SSL (https://)
, so it can't be tried on localhost. - Please try running the emulator, if you have successfully logged in correctly. you can go to the next step
- Go to the (IMAB) Add-Ons -» JSON Scraping addons menu and do the settings as usual and test,
If retrieving data is successful you can change the option Authentication Type to JSON Web Token (JWT Auth)
- Then go to (IMAB) Back-End Configuration -» Back-End Configuration again, and checked Required Authorization option
- Then go to (IMAB) Back-End Configuration -» PHP Native Generator again, then create file or upload rest-api code to your server again
Last edit: 2021-05-30 03:03:44