You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# actively maintained at https://github.com/aksinha-nerdapplabs/authOauth
3
+
###actively maintained at https://github.com/aksinha-nerdapplabs/authOauth
3
4
4
-
# A Symfony2 oAuth based RESTful API Project including Web UI with FOSUserBundle + FOSRestBundle + FOSOauthServerBundle for Mobile and Web Clients
5
+
**A Sample Symfony 2 RESTful API Project with FOSUserBundle + FOSRestBundle + FOSOauthServerBundle for Mobile and Web Clients.**
5
6
6
-
This is an example project, ready to use. This project is using below Symfony Bundles:
7
+
This is an example project, ready to use, based upon **Symfony 2.8** but can be easily adapted to higher Symfony versions. This project is using below Symfony Bundles:
@@ -15,49 +16,54 @@ This is an example project, ready to use. This project is using below Symfony Bu
15
16
The salient features of this Project are:
16
17
* This project consists of **API (currently, user management only) for Frontend consumption, via iPhone and Android Mobiles**, and an **administrative web based Backend system**.
17
18
* The APIs and the Backend system are **internationalization enabled**. Project currently supports English, French and Hindi but can be easily extended to include other languages.
18
-
* This project implements FOSRestBundle **API versioing system** via custom header "X-Accept-Version". Currently, the running API version is 1.0.
19
+
* This project implements FOSRestBundle **API versioing system** via custom header **"X-Accept-Version"**. Currently, the running API version is 1.0.
19
20
***Backend theming can easily be customized and extended**. Options have been provided to pick desired front-end theme for the Backend. The choices available are - Bootstrap, Materialize and Skeleton. **To change the theme, modify key "fronend_theme" in parameters.yml accordingly.** However, the design is open-ended and you may add your preferred theme easily. Please also note that theming has only been provided for base and nav. Other top level stuff is using bootstrap, you can theme as per your choice using base theme.
20
21
* The Web user management pages are coming directly from FOSUserBundle views. You may override these pages, per your need.
21
22
22
-
## Installation Steps:
23
-
24
-
**Step 0:**
25
-
26
-
Below environment is required:
27
-
Linux
28
-
=====
29
-
- PHP 5.6
30
-
- MySql (though other DB can also be used with a little change in the configuration)
31
-
- Apache2 (alternatively, local PHP dev server can also be used for testing purpose)
32
-
- Composer
33
-
- Chrome browser with Postman plugin or separate Postman installation to test the API (though API can also be tested via "curl" command)
34
-
35
-
Windows
36
-
=======
37
-
- MAMP
38
-
- Composer
39
-
- Chrome browser with Postman plugin or separate Postman installation to test the API (though API can also be tested via "curl" command)
40
-
41
-
Mac
42
-
===
43
-
- MAMP
44
-
- Composer
45
-
- Chrome browser with Postman plugin or separate Postman installation to test the API (though API can also be tested via "curl" command)
- MySql (though other DB can also be used with a little change in the configuration)
39
+
- Apache2 (alternatively, local PHP dev server can also be used for testing purpose)
40
+
- Composer
41
+
- Chrome browser with Postman plugin or separate Postman installation to test the API (though API can also be tested via "curl" command)
42
+
* Windows
43
+
- MAMP
44
+
- Composer
45
+
- Chrome browser with Postman plugin or separate Postman installation to test the API (though API can also be tested via "curl" command)
46
+
* Mac
47
+
- MAMP
48
+
- Composer
49
+
- Chrome browser with Postman plugin or separate Postman installation to test the API (though API can also be tested via "curl" command)
46
50
47
51
***Note regarding Webserver:***
48
52
49
-
As this project uses OAuth2 server, for smooth results, Apache webserver is highly recommended. You may want to create a site, say http://auth.dev, for it. Please refere to section **"Configuring Apache"** below for an example implementation.
53
+
As this project uses OAuth2 server, for smooth results, Apache webserver is highly recommended. You may want to create a site, say http://auth.dev, for it. Please refere to section [Configuring Apache2](#configure-apache2) below for an example implementation.
54
+
55
+
*However, if you wish to use php local dev server, you will need to start two instances of php local dev server at __two different ports (say 8000 and 8080)__ in two separate terminal windows/tabs, section [Using the Package](#using-this-package), and replace oauth urls accordingly in Step 2 below. This is necessary as php local dev server is a simple single threaded web server and oAuth server needs to work on more than one process simultaneously. Using a single local dev server severly hampers this and blocks execution.*
50
56
51
-
However, if you wish to use php local dev server, you will need to start two instances of php local dev server at two different ports (say 8000 and 8080) in two separate terminal windows/tabs, section **"Use this Package"**, and replace oauth urls accordingly in Step 2 below. This is necessary as php local dev server is a simple single threaded web server and oAuth server needs to work on more than one process simultaneously. Using a single local dev server severly hampers this and blocks execution.
57
+
# <aname="installation"></a>Installation
52
58
53
59
**Step 1 - Clone the project:**
54
60
55
61
Git clone this project from Github to a web folder, say auth, via
56
-
git clone .... auth
62
+
$ git clone .... auth
57
63
58
64
and run
59
-
cd /path/to/auth
60
-
composer install
65
+
$ cd /path/to/auth
66
+
$ composer install
61
67
62
68
**Step 2 - Replace parameter values in parameters.yml**
63
69
@@ -79,28 +85,28 @@ However, if you wish to use php local dev server, you will need to start two ins
If you are using php local dev server, please start the server at two different ports (say 8000 and 8080) in two terminal windows as below:
186
+
```
187
+
Please refer to **Note regarding webserver** in [Requirements](#requirements) section.
188
+
If you are using php local dev server, please start the server at two different ports
189
+
(say 8000 and 8080) in two terminal windows as below:
182
190
183
191
In first terminal window,
184
192
@@ -190,9 +198,12 @@ In second terminal window,
190
198
cd /path/to/auth
191
199
php app/console server:run 127.0.0.1:8080
192
200
193
-
You may also need to configure parameters.yml accordingly. Then in a browser, you may use http://127.0.0.1:8000 to run this package.
201
+
You may also need to configure parameters.yml accordingly. Then in a browser, you may use
202
+
http://127.0.0.1:8000 to run this package.
194
203
195
-
Alternatively, if you have successfully configured Apache2, then modify parameters.yml accordingly can start using the package vide say, http://auth.dev.
204
+
Alternatively, if you have successfully configured Apache2, then modify parameters.yml
205
+
accordingly can start using the package vide say, http://auth.dev.
In a browser, goto the package site by http://127.0.0.1:8000. This is the Backend Administration tool and can be plugged into any User App easily. It is a simple page. The options are self explanatory.
219
230
220
-
#### 4. Troubleshooting
231
+
#<aname="troubleshooting"></a>Troubleshooting
221
232
222
233
Sometimes, you may run into permission issues. You may try below commands, single or in combination:
0 commit comments