-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from chenkie/master
Update sample for use with beta 0
- Loading branch information
Showing
23 changed files
with
295 additions
and
310 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# v0.0.1 - Update to Angular 2 Beta (2016-01-07) | ||
|
||
* Upgraded to work with Angular 2 Beta 0 | ||
* Removed Fetch API in favor of Angular 2 Http | ||
* Included [angular2-jwt](https://github.com/auth0/angular2-jwt) for authenticated API calls | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "angular2-authentication-sample", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"description": "This is a sample that shows how to add authentication to an Angular 2 (ng2) app", | ||
"main": "", | ||
"scripts": { | ||
|
@@ -15,40 +15,43 @@ | |
}, | ||
"contributors": [ | ||
"Martin Gontovnikas (http://gon.to) <[email protected]>", | ||
"PatrickJS <[email protected]>" | ||
"PatrickJS <[email protected]>", | ||
"Ryan Chenkie <[email protected]>" | ||
], | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/auth0/angular2-authentication-sample/issues" | ||
}, | ||
"homepage": "https://github.com/auth0/angular2-authentication-sample", | ||
"dependencies": { | ||
"angular2": "2.0.0-alpha.44", | ||
"raw-loader": "0.5.1", | ||
"reflect-metadata": "0.1.2", | ||
"rtts_assert": "2.0.0-alpha.37", | ||
"rx": "4.0.6", | ||
"zone.js": "0.5.8", | ||
"bootstrap": "3.3.5", | ||
"jwt-decode": "1.4.0", | ||
"whatwg-fetch": "0.10.0", | ||
"when": "3.7.3" | ||
"angular2": "2.0.0-beta.0", | ||
"angular2-jwt": "0.1.4", | ||
"bootstrap": "^3.3.6", | ||
"es6-promise": "^3.0.2", | ||
"es6-shim": "^0.33.3", | ||
"es7-reflect-metadata": "^1.4.0", | ||
"jwt-decode": "^1.5.0", | ||
"rxjs": "5.0.0-beta.0", | ||
"zone.js": "0.5.10" | ||
}, | ||
"devDependencies": { | ||
"css-loader": "0.20.1", | ||
"css-loader": "^0.23.0", | ||
"exports-loader": "0.6.2", | ||
"expose-loader": "0.7.0", | ||
"file-loader": "0.8.4", | ||
"html-webpack-plugin": "1.6.2", | ||
"imports-loader": "0.6.5", | ||
"json-loader": "0.5.3", | ||
"loader-utils": "0.2.11", | ||
"style-loader": "0.12.4", | ||
"ts-loader": "0.5.6", | ||
"typescript": "1.6.2", | ||
"url-loader": "0.5.6", | ||
"webpack": "1.12.2", | ||
"webpack-dev-server": "1.12.1", | ||
"xtend": "4.0.0" | ||
"expose-loader": "^0.7.1", | ||
"file-loader": "^0.8.4", | ||
"imports-loader": "^0.6.4", | ||
"json-loader": "^0.5.3", | ||
"raw-loader": "0.5.1", | ||
"style-loader": "^0.13.0", | ||
"ts-loader": "^0.7.2", | ||
"tsconfig-lint": "^0.2.0", | ||
"tslint": "^3.2.0", | ||
"tslint-loader": "^2.1.0", | ||
"typedoc": "^0.3.12", | ||
"typescript": "^1.7.3", | ||
"typings": "^0.3.1", | ||
"url-loader": "^0.5.6", | ||
"webpack": "^1.12.9", | ||
"webpack-dev-server": "^1.12.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Headers } from 'angular2/http'; | ||
|
||
export const contentHeaders = new Headers(); | ||
contentHeaders.append('Accept', 'application/json'); | ||
contentHeaders.append('Content-Type', 'application/json'); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<div> | ||
<div class="home jumbotron centered"> | ||
<h1>Welcome to the angular2 authentication sample!</h1> | ||
<h2 *ng-if="jwt">Your JWT is:</h2> | ||
<pre *ng-if="jwt" class="jwt"><code>{{ jwt }}</code></pre> | ||
<pre *ng-if="jwt" class="jwt"><code>{{ decodedJwt | json }}</code></pre> | ||
<h2 *ngIf="jwt">Your JWT is:</h2> | ||
<pre *ngIf="jwt" class="jwt"><code>{{ jwt }}</code></pre> | ||
<pre *ngIf="jwt" class="jwt"><code>{{ decodedJwt | json }}</code></pre> | ||
<p>Click any of the buttons to call an API and get a response</p> | ||
<p><a class="btn btn-primary btn-lg" role="button" (click)="callAnonymousApi()">Call Anonymous API</a></p> | ||
<p><a class="btn btn-primary btn-lg" role="button" (click)="callSecuredApi()">Call Secure API</a></p> | ||
<p><a class="btn btn-primary btn-lg" role="button" (click)="logout()">Logout</a></p> | ||
<h2 *ng-if="response">The response of calling the <span class="red">{{api}}</span> API is:</h2> | ||
<h3 *ng-if="response">{{response}}</h3> | ||
<h2 *ngIf="response">The response of calling the <span class="red">{{api}}</span> API is:</h2> | ||
<h3 *ngIf="response">{{response}}</h3> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.