22< html xmlns ="http://www.w3.org/1999/xhtml ">
33 < head >
44 < meta http-equiv ="Content-Type " content ="text/html; charset=UTF-8 " />
5- < title > Angular authorization demo application </ title >
5+ < title > Angular authorization and chat demo built with Yoke </ title >
66
77 < link rel ="stylesheet " href ="/static/app/main.css " type ="text/css " media ="screen " />
88
4242
4343 < div id ="content " ng-controller ="ContentController ">
4444
45- < h1 > HTTP Auth Interceptor Module Demo</ h1 >
46- < h2 > for AngularJS</ h2 >
45+ < h1 > Angular authorization and chat demo built with Yoke</ h1 >
4746
48- < h3 > What is the purpose of this demo?</ h3 >
49- < p >
50- This demo application is to show you the implementation of the concept
51- described in
52- < a href ="http://www.espeo.pl/2012/02/26/authentication-in-angularjs-application ">
53- Authentication in AngularJS (or similar) based application.
54- </ a >
55- </ p >
56- < p >
57- This application does not talk to real server, it uses
58- < a href ="http://docs.angularjs.org/api/ngMockE2E "> ngMockE2E module</ a > instead.
59- </ p >
60- < p >
61- The HTTP Auth Interceptor module source code is available here:
62- < br >
63- < a href ="https://github.com/witoldsz/angular-http-auth ">
64- https://github.com/witoldsz/angular-http-auth
65- </ a >
66- </ p >
67- < p >
68- The source code of this demo is available in the same project as
69- a < a href ="http://pages.github.com/ "> GitHub Pages</ a > branch here:
70- < br >
71- < a href ="https://github.com/witoldsz/angular-http-auth/tree/gh-pages ">
72- https://github.com/witoldsz/angular-http-auth/tree/gh-pages
73- </ a >
74- </ p >
75- < hr >
7647 < br >
77- < h3 > Enter some data and submit to send and access public data.</ h3 >
78- < form ng-submit ="publicAction() ">
79- Enter public data:
80- < input type ="text " ng-model ="publicData ">
81- < input type ="submit " value ="Submit "> </ input >
82- </ form >
83- < p ng-repeat ="p in publicContent "> Server says: {{p}}</ p >
84-
85- < br />
86- < br />
87-
88- < h3 > Enter some data and submit to send and access protected data.</ h3 >
48+
49+ < h3 > Post some protected data. Note: "user/pass" for username and password.</ h3 >
8950 < form ng-submit ="restrictedAction() ">
9051 Enter restricted data:
9152 < input type ="text " ng-model ="restrictedData ">
@@ -94,30 +55,25 @@ <h3>Enter some data and submit to send and access protected data.</h3>
9455 < p ng-repeat ="r in restrictedContent "> Server says: {{r}}</ p >
9556
9657 < br />
97- < br />
98-
99- < h3 > Press the button to log out.</ h3 >
100- < input type ="button " value ="Log out " ng-click ="logout() "> </ input >
101- < p >
102- The button will tell the server to forget about your session and also
103- it will remove sensitive data from page.
104- </ p >
105- < p >
106- In real application it could do
107- something else like:
108- </ p >
109- < ul >
110- < li > forcing login window to appear to hide data,</ li >
111- < li > reloading web page to purge application from received content or</ li >
112- < li > whatever you find appropriate...</ li >
113- </ ul >
11458
59+ < br >
60+ < h3 > Try to chat after login.</ h3 >
61+ < ul >
62+ < li ng-repeat ="message in messages "> {{message}}</ li >
63+ </ ul >
64+ < form ng-submit ="sendMessage() ">
65+ < input type ="text " ng-model ="messageText " placeholder ="Type your message here " />
66+ < input type ="submit " value ="Send " />
67+ </ form >
11568 </ div >
11669
11770 < script src ="/static/lib/jquery-1.7.2.js " type ="text/javascript "> </ script >
11871 < script src ="/static/lib/angular-1.0.1.js " type ="text/javascript "> </ script >
11972 < script src ="/static/lib/angular-mocks-1.0.1.js " type ="text/javascript "> </ script >
12073 < script src ="/static/lib/http-auth-interceptor.js " type ="text/javascript "> </ script >
74+ < script src ="/static/lib/sockjs-0.3.4.min.js " type ="text/javascript "> </ script >
75+ < script src ="/static/lib/vertxbus.js " type ="text/javascript "> </ script >
76+
12177 < script src ="/static/app/main.js " type ="text/javascript "> </ script >
12278 < script src ="/static/app/login.js " type ="text/javascript "> </ script >
12379 < script src ="/static/app/content.js " type ="text/javascript "> </ script >
0 commit comments