31
31
< div id ="heading ">
32
32
< div id ="logo "> oauth-ng</ div >
33
33
< div id ="tagline "> AngularJS directive for OAuth 2.0</ a > </ div >
34
+ < p class ="btn-group ">
35
+ < a href ="https://github.com/andreareginato/oauth-ng " class ="btn " target ="_blank "> See on Github</ a >
36
+ </ p >
34
37
</ div >
35
38
</ section >
36
39
@@ -72,7 +75,7 @@ <h2>Basic Example</h2>
72
75
scope ="<scope> ">
73
76
</ oauth >
74
77
75
- < script > angular . module ( 'app' , [ 'ng- oauth' ] ) ; </ script >
78
+ < script > angular . module ( 'app' , [ 'oauth-ng ' ] ) ; </ script >
76
79
</ body > </ xmp > </ code > </ pre >
77
80
78
81
< p >
@@ -90,7 +93,12 @@ <h2>Basic Example</h2>
90
93
< h1 id ="howto "> Create your first app with oauth-ng</ h1 >
91
94
< p >
92
95
In this section you will learn how to use the directive to authorize an OAuth 2.0 server
93
- through the creation of a real project. It will take less than 15 minutues.
96
+ through the creation of a real project. It will take less than 10 minutues.
97
+ </ p >
98
+
99
+ < p class ="btn-group ">
100
+ < a href ="https://oauth-ng-demo.herokuapp.com/ " class ="btn " target ="_blank "> View Demo</ a >
101
+ < a href ="https://github.com/andreareginato/oauth-ng-demo " class ="btn " target ="_blank "> Demo Github Repository</ a >
94
102
</ p >
95
103
96
104
@@ -172,7 +180,7 @@ <h2>Install oauth-ng</h2>
172
180
173
181
< p >
174
182
Now you have < code > oauth-ng</ code > and all its dependencies ready to be used.
175
- To automatically add them to your index page, stop and restart the server .
183
+ Restart the server to automatically add them to your index page.
176
184
</ p >
177
185
178
186
< pre > < code > $ grunt serve</ code > </ pre >
@@ -194,35 +202,24 @@ <h2>AngularJS app definition</h2>
194
202
< h2 id ="server "> OAuth 2.0 Server</ h2 >
195
203
196
204
< p >
197
- To test the directive we created a basic OAuth 2.0 authorization server.
198
-
199
- < ul >
200
- < li > http://oauth-ng-server.herokuapp.com</ li >
201
- </ ul >
202
- </ p >
203
-
204
- < p >
205
- The source code is available on < a href ="# " target ="blank "> Github</ a > .
205
+ To test the directive we created a basic OAuth 2.0 authorization server at the address
206
+ < code > http://oauth-ng-server.herokuapp.com</ code > .
206
207
</ p >
207
208
208
209
209
210
< h2 > Identify your application</ h2 >
210
211
211
212
< p >
212
213
To make the directive work you need a registered application to get its
213
- < code > client-id</ code > and < code > redirect-uri</ code > .
214
+ < code > client-id</ code > and < code > redirect-uri</ code > . For this example we
215
+ created a demo app with the following credentials.
214
216
</ p >
215
217
216
218
< ul >
217
219
< li > < strong > client-id</ strong > - 017b9f702a904869a6e52bd39b147bb912</ li >
218
220
< li > < strong > redirect-uri</ strong > - http://localhost:9000</ li >
219
221
</ ul >
220
222
221
- < p >
222
- Use the credentials above or < a href ="" target ="blank "> register</ a >
223
- a new application.
224
- </ p >
225
-
226
223
227
224
< h2 > Add the oauth-ng directive</ h2 >
228
225
@@ -232,14 +229,14 @@ <h2>Add the oauth-ng directive</h2>
232
229
233
230
< pre > < code > < xmp > < oauth
234
231
site ="http://oauth-ng-server.herokuapp.com "
235
- client-id ="017b9f702a904869a6e52bd39b147bb912 "
232
+ client-id ="d6d2b510d18471d2e22aa202216e86c42beac80f9a6ac2da505dcb79c7b2fd99 "
236
233
redirect-uri ="http://localhost:9000 "
237
- profile-uri ="http://oauth-ng-server.herokuapp.com/profile "
238
- scope ="profile ">
234
+ profile-uri ="http://oauth-ng-server.herokuapp.com/api/v1/me "
235
+ scope ="public ">
239
236
</ oauth > </ xmp > </ code > </ pre >
240
237
241
238
< p >
242
- Here a description for the used attributes .
239
+ Here a description for what these settings are about .
243
240
</ p >
244
241
245
242
< table class ="table table-labeled ">
@@ -288,22 +285,24 @@ <h2>Add the oauth-ng directive</h2>
288
285
</ table >
289
286
290
287
291
-
292
288
< h2 > You're done!</ h2 >
293
289
294
290
< p >
295
- Nothing else to do. Open your index page, click the < code > Login</ code > link,
296
- authorize your app and get the authenticated user info . You are now ready to
297
- access to your API using OAuth 2.0 and AngularJS.
291
+ Open your index page, click to the Login link and authorize your application
292
+ to get a new access token . You are now ready to access your API using OAuth
293
+ 2.0 and AngularJS.
298
294
</ p >
299
295
300
- < p >
301
- #TODO See Demo.
296
+ < p class ="btn-group ">
297
+ < a href ="https://oauth-ng-demo.herokuapp.com/ " class ="btn " target ="_blank "> View Demo</ a >
298
+ < a href ="https://github.com/andreareginato/oauth-ng-demo " class ="btn " target ="_blank "> Demo Github Repository</ a >
302
299
</ p >
303
300
304
- < p >
305
- #TODO See Github Repository.
306
- </ p >
301
+
302
+ < a href ="https://oauth-ng-demo.herokuapp.com/ "target ="_blank ">
303
+ < img src ="public/images/demo.png "> </ img >
304
+ </ a >
305
+
307
306
</ div >
308
307
</ section >
309
308
0 commit comments