Skip to content

Commit 130d2ad

Browse files
aksinha-nerdapplabspraveen-garg
authored andcommitted
Merged in aksinhanerd/auth/readme (pull request nerdapplabs#10)
Readme changes
2 parents 8e25089 + 466503e commit 130d2ad

File tree

1 file changed

+103
-4
lines changed

1 file changed

+103
-4
lines changed

README.md

Lines changed: 103 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,105 @@
1-
authOauth
2-
=========
1+
# A Sample Symfony 2 RESTful API Project with FOSUserBundle + FOSRestBundle + FOSOauthServerBundle for Mobile and Web Clients
32

4-
A Symfony project created on January 20, 2017, 2:52 pm.
3+
This is an example project, ready to use. This project is using below Symfony Bundles:
54

6-
[Read Installtion and Usage](myReadMe.md)
5+
* [FOSUserBundle](https://github.com/FriendsOfSymfony/FOSUserBundle)
6+
* [FOSRestBundle](https://github.com/FriendsOfSymfony/FOSRestBundle)
7+
* [FOSOAuthServerBundle](https://github.com/FriendsOfSymfony/FOSOAuthServerBundle)
8+
* [JMSSerializerBundle](https://github.com/schmittjoh/JMSSerializerBundle)
9+
* [NelmioApiDocBundle](http://symfony.com/doc/current/bundles/NelmioApiDocBundle/index.html)
10+
* [AsseticBundle](https://github.com/symfony/assetic-bundle)
11+
12+
## Installation Steps:
13+
14+
**Step 0:**
15+
16+
Below environment is required:
17+
Linux
18+
=====
19+
- PHP 5.6
20+
- MySql (though other DB can also be used with a little change in the configuration)
21+
- Apache2 (alternatively, local PHP dev server can also be used for testing purpose)
22+
- Composer
23+
- Chrome browser with Postman plugin or separate Postman installation to test the API (though API can also be tested via "curl" command)
24+
25+
Windows
26+
=======
27+
- MAMP
28+
- Composer
29+
- Chrome browser with Postman plugin or separate Postman installation to test the API (though API can also be tested via "curl" command)
30+
31+
Mac
32+
===
33+
- MAMP
34+
- Composer
35+
- Chrome browser with Postman plugin or separate Postman installation to test the API (though API can also be tested via "curl" command)
36+
37+
**Step 1 - Clone the project:**
38+
39+
Git clone this project from Github to a web folder, say auth, via
40+
git clone .... auth
41+
42+
and run
43+
cd /path/to/auth
44+
composer install
45+
46+
**Step 2 - Create Database tables**
47+
48+
cd /path/to/auth
49+
php app/console doctrine:database:create
50+
php app/console doctrine:scheme:create
51+
52+
**Step 3 - Create assets**
53+
54+
cd /path/to/auth
55+
php app/console assets:install
56+
php app/console assetic:dump
57+
58+
**Step 4 - Create an Admin user**
59+
60+
cd /path/to/auth
61+
php app/console fos:user:create admin [email protected] password
62+
63+
Make this user admin
64+
65+
php app/console fos:user:create admin ROLE_ADMIN
66+
67+
Now you are ready to use the Package!
68+
69+
## Use this Package
70+
71+
1. Test API
72+
2. Use API via a Mobile Client
73+
3. Backend Administration
74+
75+
You will need to start the server before you can use this package:
76+
77+
cd /path/to/auth
78+
php app/console server:run
79+
80+
#### 1. Test API
81+
82+
You can test the provided API via curl or Postman. Here we provide as to how to use Postman.
83+
84+
**API documentation is available, via NelmioApiDocBundle, at http://127.0.0.1:800/api/doc.**
85+
86+
* We have provide sample Postman Collections. Please import any of the Collection to Postman.
87+
* Open the imported Collection and start executing the contained links one by one. For your convenience, we have arranged the links in the preferred order of execution.
88+
* You may start with create the client via API or you will have to use client_id and client_secret of the client created above via command line.
89+
90+
91+
#### 2. Use API via a Mobile Client
92+
93+
Separate sample Github repos are available for iPhone and Android Mobile Clients which use APIs provided by this repo.
94+
95+
iPhone:
96+
Android:
97+
98+
#### 3. Backend Administration
99+
100+
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.
101+
102+
The salient features of the Backend are:
103+
* The Backend is internationalization enabled. It currently supports English, French and Hindi.
104+
* 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.
105+
* The Web user management pages are coming directly from FOSUserBundle views. You may override these pages, per your need.

0 commit comments

Comments
 (0)