42 lines
1.9 KiB
Plaintext
Executable File
42 lines
1.9 KiB
Plaintext
Executable File
.hero-unit
|
|
h1 Log in
|
|
p This site is an example of how one can implement role based authentication in Angular applications as outlined in
|
|
a(href="http://www.frederiknakstad.com/authentication-in-single-page-applications-with-angular-js/") this blogpost
|
|
| . All the code can be found in
|
|
a(href="https://github.com/fnakstad/angular-client-side-auth") this GitHub repository
|
|
| . You can either register a new user, log in with one of the two predefined users...
|
|
ul
|
|
li admin/123
|
|
li user/123
|
|
form.form-horizontal(ng-submit="login()", name="loginForm")
|
|
.control-group
|
|
label.control-label(for="username") Username
|
|
.controls
|
|
input(type="text", data-ng-model="username", placeholder="Username", name="username", required, autofocus)
|
|
.control-group
|
|
label.control-label(for="password") Password
|
|
.controls
|
|
input(type="password", data-ng-model="password", placeholder="Password", name="password", required)
|
|
.control-group
|
|
.controls
|
|
label(for="rememberme").checkbox
|
|
input(type="checkbox", data-ng-model="rememberme", name="rememberme")
|
|
| Remember me
|
|
.control-group
|
|
.controls
|
|
button.btn(type="submit", data-ng-disabled="loginForm.$invalid") Log in
|
|
hr
|
|
p ... or use one of them fancy social logins:
|
|
.btn-group
|
|
a.btn(href="", data-ng-click="loginOauth('facebook')")
|
|
i.icon-facebook-sign
|
|
| Facebook
|
|
a.btn(href="", data-ng-click="loginOauth('twitter')")
|
|
i.icon-twitter
|
|
| Twitter
|
|
a.btn(href="", data-ng-click="loginOauth('google')")
|
|
i.icon-google-plus-sign
|
|
| Google
|
|
a.btn(href="", data-ng-click="loginOauth('linkedin')")
|
|
i.icon-linkedin
|
|
| LinkedIn |