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
Copy file name to clipboardExpand all lines: README.md
+60-34Lines changed: 60 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
-
# A Sample Symfony 2 RESTful API Project with FOSUserBundle + FOSRestBundle + FOSOauthServerBundle for Mobile and Web Clients
1
+
# authOauth
2
2
3
-
This is an example project, ready to use. This project is using below Symfony Bundles:
3
+
**A Sample Symfony 2 RESTful API Project with FOSUserBundle + FOSRestBundle + FOSOauthServerBundle for Mobile and Web Clients.**
4
+
5
+
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:
@@ -12,40 +14,45 @@ This is an example project, ready to use. This project is using below Symfony Bu
12
14
The salient features of this Project are:
13
15
* This project consists of **API (currently, user management only) for Frontend consumption, via iPhone and Android Mobiles**, and an **administrative web based Backend system**.
14
16
* 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.
15
-
* This project implements FOSRestBundle **API versioing system** via custom header "X-Accept-Version". Currently, the running API version is 1.0.
17
+
* This project implements FOSRestBundle **API versioing system** via custom header **"X-Accept-Version"**. Currently, the running API version is 1.0.
16
18
***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.
17
19
* The Web user management pages are coming directly from FOSUserBundle views. You may override these pages, per your need.
18
20
19
-
## Installation Steps:
20
-
21
-
**Step 0:**
22
-
23
-
Below environment is required:
24
-
Linux
25
-
=====
26
-
- PHP 5.6
27
-
- MySql (though other DB can also be used with a little change in the configuration)
28
-
- Apache2 (alternatively, local PHP dev server can also be used for testing purpose)
29
-
- Composer
30
-
- Chrome browser with Postman plugin or separate Postman installation to test the API (though API can also be tested via "curl" command)
31
-
32
-
Windows
33
-
=======
34
-
- MAMP
35
-
- Composer
36
-
- Chrome browser with Postman plugin or separate Postman installation to test the API (though API can also be tested via "curl" command)
37
-
38
-
Mac
39
-
===
40
-
- MAMP
41
-
- Composer
42
-
- 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)
37
+
- Apache2 (alternatively, local PHP dev server can also be used for testing purpose)
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
+
* Windows
41
+
- MAMP
42
+
- Composer
43
+
- Chrome browser with Postman plugin or separate Postman installation to test the API (though API can also be tested via "curl" command)
44
+
* Mac
45
+
- MAMP
46
+
- Composer
47
+
- Chrome browser with Postman plugin or separate Postman installation to test the API (though API can also be tested via "curl" command)
43
48
44
49
***Note regarding Webserver:***
45
50
46
-
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.
51
+
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.
47
52
48
-
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.
53
+
*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.*
54
+
55
+
# <aname="installation"></a>Installation
49
56
50
57
**Step 1 - Clone the project:**
51
58
@@ -97,7 +104,7 @@ 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:
184
+
```
185
+
186
+
Please refer to **Note regarding webserver** in [Requirements](#requirements) section. 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:
179
187
180
188
In first terminal window,
181
189
@@ -191,6 +199,8 @@ You may also need to configure parameters.yml accordingly. Then in a browser, yo
191
199
192
200
Alternatively, if you have successfully configured Apache2, then modify parameters.yml accordingly can start using the package vide say, http://auth.dev.
193
201
202
+
```
203
+
194
204
#### 1. Test API
195
205
196
206
You can test the provided API via curl or Postman. Here we provide as to how to use Postman.
@@ -213,7 +223,7 @@ Separate sample Github repos are available for iPhone and Android Mobile Clients
213
223
214
224
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.
215
225
216
-
#### 4. Troubleshooting
226
+
#<aname="troubleshooting"></a>Troubleshooting
217
227
218
228
Sometimes, you may run into permission issues. You may try below commands, single or in combination:
0 commit comments