From cb633bcb2dbbda3b67b2287fe607442fd1a65cf2 Mon Sep 17 00:00:00 2001 From: Ryan Chenkie Date: Sat, 22 Oct 2016 19:45:24 -0400 Subject: [PATCH] cleanup --- README.md | 13 ------------- angular2-jwt.ts | 4 ++-- package.json | 2 -- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 6be9e40d..ef3edfac 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,6 @@ For examples of integrating **angular2-jwt** with SystemJS, see [auth0-angular2] - [Sending Authenticated Requests](#sending-authenticated-requests) - [Configuration Options](#configuration-options) - [Configuring angular2-jwt with `provideAuth`](#configuring-angular2-jwt-with-provideauth) - - [Use with SystemJS](#use-with-systemjs) - [Configuation for Ionic 2](#configuation-for-ionic-2) - [Sending Per-Request Headers](#sending-per-request-headers) - [Using the Observable Token Stream](#using-the-observable-token-stream) @@ -154,18 +153,6 @@ import { provideAuth } from 'angular2-jwt'; }) ``` -### Use with SystemJS - -Angular2-jwt depends on `js-base64`, which in turn potentially uses `buffer`. If you are -using SystemJS, you need to add the following to the map section of your system config: - -``` - 'angular2-jwt': 'npm:angular2-jwt/angular2-jwt.js', - 'js-base64':'npm:js-base64/base64.js', - 'buffer':'@empty' -``` -Note that if you wish to use buffer, you are free to depend on and provide it. - ### Configuation for Ionic 2 To configure angular2-jwt in Ionic 2 applications, use the factory pattern in your `@NgModule`. Since Ionic 2 provides its own API for accessing local storage, configure the `tokenGetter` to use it. diff --git a/angular2-jwt.ts b/angular2-jwt.ts index 9d394320..cd4cfd99 100644 --- a/angular2-jwt.ts +++ b/angular2-jwt.ts @@ -199,8 +199,8 @@ export class JwtHelper { } // https://developer.mozilla.org/en/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#The_Unicode_Problem - private b64DecodeUnicode(str) { - return decodeURIComponent(Array.prototype.map.call(atob(str), (c) => { + private b64DecodeUnicode(str: any) { + return decodeURIComponent(Array.prototype.map.call(atob(str), (c: any) => { return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2); }).join('')); } diff --git a/package.json b/package.json index 99cca42a..60b6b561 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,5 @@ "@angular/core": "^2.0.0", "@angular/http": "^2.0.0", "rxjs": "5.0.0-beta.12" - }, - "dependencies": { } }