From 17a271d3254455d746c67a8776d71544ed67edb4 Mon Sep 17 00:00:00 2001 From: Sahat Yalkabov Date: Sat, 23 Jul 2016 19:20:10 -0700 Subject: [PATCH] v0.15.4 --- README.md | 2 +- dist/satellizer.js | 2 +- dist/satellizer.js.map | 2 +- examples/client/vendor/satellizer.js | 2 +- examples/server/php/public/vendor/satellizer.js | 2 +- package.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 60475c6e..eb10fb70 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ in the app *config* block. ``` ```html - + ``` #### NPM diff --git a/dist/satellizer.js b/dist/satellizer.js index b29e28f2..49ff9849 100644 --- a/dist/satellizer.js +++ b/dist/satellizer.js @@ -1,5 +1,5 @@ /** - * Satellizer 0.15.3 + * Satellizer 0.15.4 * (c) 2016 Sahat Yalkabov * License: MIT */ diff --git a/dist/satellizer.js.map b/dist/satellizer.js.map index eac75887..06b10bc8 100644 --- a/dist/satellizer.js.map +++ b/dist/satellizer.js.map @@ -1 +1 @@ -{"version":3,"file":null,"sources":["../src/config.ts","../src/authProvider.ts","../src/utils.ts","../src/shared.ts","../src/local.ts","../src/popup.ts","../src/oauth1.ts","../src/oauth2.ts","../src/oauth.ts","../src/storage.ts","../src/interceptor.ts","../src/httpProviderConfig.ts","../src/ng1.ts"],"sourcesContent":["export default class Config {\n static get getConstant() {\n return new Config();\n }\n\n baseUrl = '/';\n loginUrl = '/auth/login';\n signupUrl = '/auth/signup';\n unlinkUrl = '/auth/unlink/';\n tokenName = 'token';\n tokenPrefix = 'satellizer';\n tokenHeader = 'Authorization';\n tokenType = 'Bearer';\n storageType = 'localStorage';\n tokenRoot = null;\n withCredentials = false;\n providers = {\n facebook: {\n name: 'facebook',\n url: '/auth/facebook',\n authorizationEndpoint: 'https://www.facebook.com/v2.5/dialog/oauth',\n redirectUri: window.location.origin + '/',\n requiredUrlParams: ['display', 'scope'],\n scope: ['email'],\n scopeDelimiter: ',',\n display: 'popup',\n oauthType: '2.0',\n popupOptions: { width: 580, height: 400 }\n },\n google: {\n name: 'google',\n url: '/auth/google',\n authorizationEndpoint: 'https://accounts.google.com/o/oauth2/auth',\n redirectUri: window.location.origin,\n requiredUrlParams: ['scope'],\n optionalUrlParams: ['display', 'state'],\n scope: ['profile', 'email'],\n scopePrefix: 'openid',\n scopeDelimiter: ' ',\n display: 'popup',\n oauthType: '2.0',\n popupOptions: { width: 452, height: 633 },\n state: () => encodeURIComponent(Math.random().toString(36).substr(2))\n },\n github: {\n name: 'github',\n url: '/auth/github',\n authorizationEndpoint: 'https://github.com/login/oauth/authorize',\n redirectUri: window.location.origin,\n optionalUrlParams: ['scope'],\n scope: ['user:email'],\n scopeDelimiter: ' ',\n oauthType: '2.0',\n popupOptions: { width: 1020, height: 618 }\n },\n instagram: {\n name: 'instagram',\n url: '/auth/instagram',\n authorizationEndpoint: 'https://api.instagram.com/oauth/authorize',\n redirectUri: window.location.origin,\n requiredUrlParams: ['scope'],\n scope: ['basic'],\n scopeDelimiter: '+',\n oauthType: '2.0'\n },\n linkedin: {\n name: 'linkedin',\n url: '/auth/linkedin',\n authorizationEndpoint: 'https://www.linkedin.com/uas/oauth2/authorization',\n redirectUri: window.location.origin,\n requiredUrlParams: ['state'],\n scope: ['r_emailaddress'],\n scopeDelimiter: ' ',\n state: 'STATE',\n oauthType: '2.0',\n popupOptions: { width: 527, height: 582 }\n },\n twitter: {\n name: 'twitter',\n url: '/auth/twitter',\n authorizationEndpoint: 'https://api.twitter.com/oauth/authenticate',\n redirectUri: window.location.origin,\n oauthType: '1.0',\n popupOptions: { width: 495, height: 645 }\n },\n twitch: {\n name: 'twitch',\n url: '/auth/twitch',\n authorizationEndpoint: 'https://api.twitch.tv/kraken/oauth2/authorize',\n redirectUri: window.location.origin,\n requiredUrlParams: ['scope'],\n scope: ['user_read'],\n scopeDelimiter: ' ',\n display: 'popup',\n oauthType: '2.0',\n popupOptions: { width: 500, height: 560 }\n },\n live: {\n name: 'live',\n url: '/auth/live',\n authorizationEndpoint: 'https://login.live.com/oauth20_authorize.srf',\n redirectUri: window.location.origin,\n requiredUrlParams: ['display', 'scope'],\n scope: ['wl.emails'],\n scopeDelimiter: ' ',\n display: 'popup',\n oauthType: '2.0',\n popupOptions: { width: 500, height: 560 }\n },\n yahoo: {\n name: 'yahoo',\n url: '/auth/yahoo',\n authorizationEndpoint: 'https://api.login.yahoo.com/oauth2/request_auth',\n redirectUri: window.location.origin,\n scope: [],\n scopeDelimiter: ',',\n oauthType: '2.0',\n popupOptions: { width: 559, height: 519 }\n },\n bitbucket: {\n name: 'bitbucket',\n url: '/auth/bitbucket',\n authorizationEndpoint: 'https://bitbucket.org/site/oauth2/authorize',\n redirectUri: window.location.origin + '/',\n requiredUrlParams: ['scope'],\n scope: ['email'],\n scopeDelimiter: ' ',\n oauthType: '2.0',\n popupOptions: { width: 1028, height: 529 }\n }\n };\n httpInterceptor: any = (): boolean => true;\n};\n","import Config from './config';\nimport { IOAuth1Options } from './oauth1';\nimport { IOAuth2Options } from './oauth2';\n\nexport default class AuthProvider {\n static $inject = ['SatellizerConfig'];\n\n constructor(private SatellizerConfig: Config) {}\n\n get baseUrl(): string { return this.SatellizerConfig.baseUrl; }\n set baseUrl(value) { this.SatellizerConfig.baseUrl = value; }\n\n get loginUrl(): string { return this.SatellizerConfig.loginUrl; }\n set loginUrl(value) { this.SatellizerConfig.loginUrl = value; }\n\n get signupUrl(): string { return this.SatellizerConfig.signupUrl; }\n set signupUrl(value) { this.SatellizerConfig.signupUrl = value; }\n\n get unlinkUrl(): string { return this.SatellizerConfig.unlinkUrl; }\n set unlinkUrl(value) { this.SatellizerConfig.unlinkUrl = value; }\n\n get tokenRoot(): string { return this.SatellizerConfig.tokenRoot; }\n set tokenRoot(value) { this.SatellizerConfig.tokenRoot = value; }\n\n get tokenName(): string { return this.SatellizerConfig.tokenName; }\n set tokenName(value) { this.SatellizerConfig.tokenName = value; }\n\n get tokenPrefix(): string { return this.SatellizerConfig.tokenPrefix; }\n set tokenPrefix(value) { this.SatellizerConfig.tokenPrefix = value; }\n\n get tokenHeader(): string { return this.SatellizerConfig.tokenHeader; }\n set tokenHeader(value) { this.SatellizerConfig.tokenHeader = value; }\n\n get tokenType(): string { return this.SatellizerConfig.tokenType; }\n set tokenType(value) { this.SatellizerConfig.tokenType = value; }\n\n get withCredentials(): boolean { return this.SatellizerConfig.withCredentials; }\n set withCredentials(value) { this.SatellizerConfig.withCredentials = value; }\n\n get storageType(): string { return this.SatellizerConfig.storageType; }\n set storageType(value) { this.SatellizerConfig.storageType = value; }\n\n get httpInterceptor(): boolean { return this.SatellizerConfig.httpInterceptor; }\n set httpInterceptor(value) {\n if (typeof value === 'function') {\n this.SatellizerConfig.httpInterceptor = value;\n } else {\n this.SatellizerConfig.httpInterceptor = () => value;\n }\n }\n\n facebook(options: IOAuth2Options): void {\n angular.extend(this.SatellizerConfig.providers.facebook, options);\n }\n\n google(options: IOAuth2Options): void {\n angular.extend(this.SatellizerConfig.providers.google, options);\n }\n\n github(options: IOAuth2Options): void {\n angular.extend(this.SatellizerConfig.providers.github, options);\n }\n\n instagram(options: IOAuth2Options): void {\n angular.extend(this.SatellizerConfig.providers.instagram, options);\n }\n\n linkedin(options: IOAuth2Options): void {\n angular.extend(this.SatellizerConfig.providers.linkedin, options);\n }\n\n twitter(options: IOAuth1Options): void {\n angular.extend(this.SatellizerConfig.providers.twitter, options);\n }\n\n twitch(options: IOAuth2Options): void {\n angular.extend(this.SatellizerConfig.providers.twitch, options);\n }\n\n live(options: IOAuth2Options): void {\n angular.extend(this.SatellizerConfig.providers.live, options);\n }\n\n yahoo(options: IOAuth2Options): void {\n angular.extend(this.SatellizerConfig.providers.yahoo, options);\n }\n\n bitbucket(options: IOAuth2Options): void {\n angular.extend(this.SatellizerConfig.providers.bitbucket, options);\n }\n\n oauth1(options: IOAuth1Options): void {\n this.SatellizerConfig.providers[options.name] = angular.extend(options, {\n oauthType: '1.0'\n });\n }\n\n oauth2(options: IOAuth2Options): void {\n this.SatellizerConfig.providers[options.name] = angular.extend(options, {\n oauthType: '2.0'\n });\n }\n\n $get(SatellizerShared, SatellizerLocal, SatellizerOAuth): any {\n return {\n login: (user, options) => SatellizerLocal.login(user, options),\n signup: (user, options) => SatellizerLocal.signup(user, options),\n logout: () => SatellizerShared.logout(),\n authenticate: (name, data) => SatellizerOAuth.authenticate(name, data),\n link: (name, data) => SatellizerOAuth.authenticate(name, data),\n unlink: (name, options) => SatellizerOAuth.unlink(name, options),\n isAuthenticated: () => SatellizerShared.isAuthenticated(),\n getPayload: () => SatellizerShared.getPayload(),\n getToken: () => SatellizerShared.getToken(),\n setToken: (token) => SatellizerShared.setToken({ access_token: token }),\n removeToken: () => SatellizerShared.removeToken(),\n setStorageType: (type) => SatellizerShared.setStorageType(type)\n };\n }\n}\n\nAuthProvider.prototype.$get.$inject = ['SatellizerShared', 'SatellizerLocal', 'SatellizerOAuth'];","export function joinUrl (baseUrl, url) {\n if (/^(?:[a-z]+:)?\\/\\//i.test(url)) {\n return url;\n }\n let joined = [baseUrl, url].join('/');\n let normalize = function (str) {\n return str\n .replace(/[\\/]+/g, '/')\n .replace(/\\/\\?/g, '?')\n .replace(/\\/\\#/g, '#')\n .replace(/\\:\\//g, '://');\n };\n return normalize(joined);\n}\n\nexport function getFullUrlPath (location) {\n const isHttps = location.protocol === 'https:';\n return location.protocol + '//' + location.hostname +\n ':' + (location.port || (isHttps ? '443' : '80')) +\n (/^\\//.test(location.pathname) ? location.pathname : '/' + location.pathname);\n}\n\nexport function parseQueryString (str) {\n let obj = {};\n let key;\n let value;\n angular.forEach((str || '').split('&'), (keyValue) => {\n if (keyValue) {\n value = keyValue.split('=');\n key = decodeURIComponent(value[0]);\n obj[key] = angular.isDefined(value[1]) ? decodeURIComponent(value[1]) : true;\n }\n });\n return obj;\n}\n\nexport function decodeBase64 (str) {\n let buffer;\n if (typeof module !== 'undefined' && module.exports) {\n try {\n buffer = require('buffer').Buffer;\n } catch (err) {\n // noop\n }\n }\n\n let fromCharCode = String.fromCharCode;\n\n let re_btou = new RegExp([\n '[\\xC0-\\xDF][\\x80-\\xBF]',\n '[\\xE0-\\xEF][\\x80-\\xBF]{2}',\n '[\\xF0-\\xF7][\\x80-\\xBF]{3}'\n ].join('|'), 'g');\n\n let cb_btou = function (cccc) {\n switch (cccc.length) {\n case 4:\n let cp = ((0x07 & cccc.charCodeAt(0)) << 18)\n | ((0x3f & cccc.charCodeAt(1)) << 12)\n | ((0x3f & cccc.charCodeAt(2)) << 6)\n | (0x3f & cccc.charCodeAt(3));\n let offset = cp - 0x10000;\n return (fromCharCode((offset >>> 10) + 0xD800)\n + fromCharCode((offset & 0x3FF) + 0xDC00));\n case 3:\n return fromCharCode(\n ((0x0f & cccc.charCodeAt(0)) << 12)\n | ((0x3f & cccc.charCodeAt(1)) << 6)\n | (0x3f & cccc.charCodeAt(2))\n );\n default:\n return fromCharCode(\n ((0x1f & cccc.charCodeAt(0)) << 6)\n | (0x3f & cccc.charCodeAt(1))\n );\n }\n };\n\n let btou = function (b) {\n return b.replace(re_btou, cb_btou);\n };\n\n let _decode = buffer ? function (a) {\n return (a.constructor === buffer.constructor\n ? a : new buffer(a, 'base64')).toString();\n }\n : function (a) {\n return btou(atob(a));\n };\n\n return _decode(\n String(str).replace(/[-_]/g, function (m0) {\n return m0 === '-' ? '+' : '/';\n })\n .replace(/[^A-Za-z0-9\\+\\/]/g, '')\n );\n}\n","import Config from './config';\nimport Storage from './storage';\nimport { decodeBase64 } from './utils';\n\nclass Shared {\n static $inject = ['$q', '$window', '$log', 'SatellizerConfig', 'SatellizerStorage'];\n \n private prefixedTokenName: string;\n\n constructor(private $q: angular.IQService,\n private $window: angular.IWindowService,\n private $log: angular.ILogService,\n private SatellizerConfig: Config,\n private SatellizerStorage: Storage) {\n const { tokenName, tokenPrefix } = this.SatellizerConfig;\n this.prefixedTokenName = tokenPrefix ? [tokenPrefix, tokenName].join('_') : tokenName;\n }\n\n getToken(): string {\n return this.SatellizerStorage.get(this.prefixedTokenName);\n }\n\n getPayload(): any {\n const token = this.SatellizerStorage.get(this.prefixedTokenName);\n\n if (token && token.split('.').length === 3) {\n try {\n const base64Url = token.split('.')[1];\n const base64 = base64Url.replace('-', '+').replace('_', '/');\n return JSON.parse(decodeBase64(base64));\n } catch (e) {\n // no-op\n }\n }\n }\n\n setToken(response): void {\n if (!response) {\n return this.$log.warn('Can\\'t set token without passing a value');\n }\n\n let token;\n const accessToken = response && response.access_token;\n\n if (accessToken) {\n if (angular.isObject(accessToken) && angular.isObject(accessToken.data)) {\n response = accessToken;\n } else if (angular.isString(accessToken)) {\n token = accessToken;\n }\n }\n\n if (!token && response) {\n const tokenRootData = this.SatellizerConfig.tokenRoot && this.SatellizerConfig.tokenRoot.split('.').reduce(function(o, x) { return o[x]; }, response.data);\n token = tokenRootData ? tokenRootData[this.SatellizerConfig.tokenName] : response.data && response.data[this.SatellizerConfig.tokenName];\n }\n\n if (!token) {\n const tokenPath = this.SatellizerConfig.tokenRoot ? this.SatellizerConfig.tokenRoot + '.' + this.SatellizerConfig.tokenName : this.SatellizerConfig.tokenName;\n return this.$log.warn('Expecting a token named \"' + tokenPath);\n }\n\n this.SatellizerStorage.set(this.prefixedTokenName, token);\n }\n\n removeToken(): void {\n this.SatellizerStorage.remove(this.prefixedTokenName);\n }\n\n isAuthenticated(): boolean {\n const token = this.SatellizerStorage.get(this.prefixedTokenName);\n\n if (token) { // Token is present\n if (token.split('.').length === 3) { // Token with a valid JWT format XXX.YYY.ZZZ\n try { // Could be a valid JWT or an access token with the same format\n const base64Url = token.split('.')[1];\n const base64 = base64Url.replace('-', '+').replace('_', '/');\n const exp = JSON.parse(this.$window.atob(base64)).exp;\n if (exp) { // JWT with an optonal expiration claims\n return (Math.round(new Date().getTime() / 1000) >= exp) ? false : true;\n }\n } catch (e) {\n return true; // Pass: Non-JWT token that looks like JWT\n }\n }\n return true; // Pass: All other tokens\n }\n return false; // Fail: No token at all\n }\n\n logout(): angular.IPromise {\n this.SatellizerStorage.remove(this.prefixedTokenName);\n return this.$q.when();\n }\n\n setStorageType(type): void {\n this.SatellizerConfig.storageType = type;\n }\n}\n\nexport default Shared;\n","import { joinUrl } from './utils';\nimport Config from './config';\nimport Shared from './shared';\n\nclass Local {\n static $inject = ['$http', 'SatellizerConfig', 'SatellizerShared'];\n\n\n constructor(private $http: angular.IHttpService,\n private SatellizerConfig: Config,\n private SatellizerShared: Shared) {}\n\n login(user: string|Object, options: any = {}): angular.IHttpPromise {\n options.url = options.url ? options.url : joinUrl(this.SatellizerConfig.baseUrl, this.SatellizerConfig.loginUrl);\n options.data = user || options.data;\n options.method = options.method || 'POST';\n options.withCredentials = options.withCredentials || this.SatellizerConfig.withCredentials;\n\n return this.$http(options).then((response) => {\n this.SatellizerShared.setToken(response);\n return response;\n });\n }\n\n signup(user: string|Object, options: any = {}): angular.IHttpPromise {\n options.url = options.url ? options.url : joinUrl(this.SatellizerConfig.baseUrl, this.SatellizerConfig.signupUrl);\n options.data = user || options.data;\n options.method = options.method || 'POST';\n options.withCredentials = options.withCredentials || this.SatellizerConfig.withCredentials;\n\n return this.$http(options);\n }\n}\n\nexport default Local;\n","import { parseQueryString, getFullUrlPath } from './utils';\n\nexport interface IPopup {\n open(url: string, name: string, popupOptions: { width: number, height: number }): void;\n stringifyOptions (options: any): string;\n polling(redirectUri: string): angular.IPromise;\n eventListener(redirectUri: string): angular.IPromise;\n}\n\nexport default class Popup implements IPopup {\n static $inject = ['$interval', '$window', '$q'];\n\n public popup: any;\n private url: string;\n private defaults: { redirectUri: string };\n\n constructor(private $interval: angular.IIntervalService,\n private $window: angular.IWindowService,\n private $q: angular.IQService) {\n this.popup = null;\n this.url = 'about:blank'; // TODO remove\n this.defaults = {\n redirectUri: null\n };\n }\n\n stringifyOptions (options: any): string {\n const parts = [];\n angular.forEach(options, function (value, key) {\n parts.push(key + '=' + value);\n });\n return parts.join(',');\n }\n\n open(url: string, name: string, popupOptions: { width: number, height: number }): void {\n this.url = url; // TODO remove\n\n const width = popupOptions.width || 500;\n const height = popupOptions.height || 500;\n\n const options = this.stringifyOptions({\n width: width,\n height: height,\n top: this.$window.screenY + ((this.$window.outerHeight - height) / 2.5),\n left: this.$window.screenX + ((this.$window.outerWidth - width) / 2)\n });\n\n const popupName = this.$window['cordova'] || this.$window.navigator.userAgent.indexOf('CriOS') > -1 ? '_blank' : name;\n\n this.popup = window.open(this.url, popupName, options);\n\n if (this.popup && this.popup.focus) {\n this.popup.focus();\n }\n //\n // if (this.$window['cordova']) {\n // return this.eventListener(this.defaults.redirectUri); // TODO pass redirect uri\n // } else {\n // return this.polling(redirectUri);\n // }\n }\n\n polling(redirectUri: string): angular.IPromise {\n return this.$q((resolve, reject) => {\n const redirectUriParser = document.createElement('a');\n redirectUriParser.href = redirectUri;\n const redirectUriPath = getFullUrlPath(redirectUriParser);\n\n const polling = this.$interval(() => {\n if (!this.popup || this.popup.closed || this.popup.closed === undefined) {\n this.$interval.cancel(polling);\n reject(new Error('The popup window was closed'));\n }\n\n try {\n const popupWindowPath = getFullUrlPath(this.popup.location);\n\n if (popupWindowPath === redirectUriPath) {\n if (this.popup.location.search || this.popup.location.hash) {\n const query = parseQueryString(this.popup.location.search.substring(1).replace(/\\/$/, ''));\n const hash = parseQueryString(this.popup.location.hash.substring(1).replace(/[\\/$]/, ''));\n const params = angular.extend({}, query, hash);\n\n if (params.error) {\n reject(new Error(params.error));\n } else {\n resolve(params);\n }\n } else {\n reject(new Error(\n 'OAuth redirect has occurred but no query or hash parameters were found. ' +\n 'They were either not set during the redirect, or were removed—typically by a ' +\n 'routing library—before Satellizer could read it.'\n ));\n }\n\n this.$interval.cancel(polling);\n this.popup.close();\n }\n } catch (error) {\n // Ignore DOMException: Blocked a frame with origin from accessing a cross-origin frame.\n // A hack to get around same-origin security policy errors in IE.\n }\n }, 500);\n });\n }\n\n eventListener(redirectUri): angular.IPromise {\n return this.$q((resolve, reject) => {\n this.popup.addEventListener('loadstart', (event) => {\n if (!event.url.includes(redirectUri)) {\n return;\n }\n\n const parser = document.createElement('a');\n parser.href = event.url;\n\n if (parser.search || parser.hash) {\n const query = parseQueryString(parser.search.substring(1).replace(/\\/$/, ''));\n const hash = parseQueryString(parser.hash.substring(1).replace(/[\\/$]/, ''));\n const params = angular.extend({}, query, hash);\n\n if (params.error) {\n reject(new Error(params.error));\n } else {\n resolve(params);\n }\n\n this.popup.close();\n }\n });\n\n this.popup.addEventListener('loaderror', () => {\n reject(new Error('Authorization failed'));\n });\n\n this.popup.addEventListener('exit', () => {\n reject(new Error('The popup window was closed'));\n });\n });\n }\n}\n","import { joinUrl } from './utils';\nimport Config from './config';\nimport Popup from './popup';\nimport { IOAuth1Options } from './oauth1';\n\nexport interface IOAuth1 {\n init(options: any, data: any): angular.IPromise;\n getRequestToken(): angular.IHttpPromise;\n openPopup(options: IOAuth1Options, response: angular.IHttpPromiseCallbackArg): angular.IPromise;\n exchangeForToken(oauthData: any, userData: any): angular.IHttpPromise;\n buildQueryString(obj: any): string;\n}\n\nexport interface IOAuth1Options {\n name: string;\n url: string;\n authorizationEndpoint: string;\n redirectUri: string;\n scope: string[];\n scopePrefix: string;\n scopeDelimiter: string;\n requiredUrlParams: string[];\n defaultUrlParams: string[];\n oauthType: string;\n popupOptions: { width: number, height: number };\n}\n\nexport default class OAuth1 implements IOAuth1 {\n static $inject = ['$http', '$window', 'SatellizerConfig', 'SatellizerPopup'];\n\n private defaults: IOAuth1Options;\n\n constructor(private $http: ng.IHttpService,\n private $window: ng.IWindowService,\n private SatellizerConfig: Config,\n private SatellizerPopup: Popup) {\n \n this.defaults = {\n name: null,\n url: null,\n authorizationEndpoint: null,\n scope: null,\n scopePrefix: null,\n scopeDelimiter: null,\n redirectUri: null,\n requiredUrlParams: null,\n defaultUrlParams: null,\n oauthType: '1.0',\n popupOptions: { width: null, height: null }\n };\n };\n\n init(options: IOAuth1Options, userData: any): angular.IHttpPromise {\n angular.extend(this.defaults, options);\n\n if (!this.$window['cordova']) {\n this.SatellizerPopup.open('about:blank', options.name, options.popupOptions);\n }\n\n return this.getRequestToken().then((response) => {\n return this.openPopup(options, response).then((popupResponse) => {\n return this.exchangeForToken(popupResponse, userData);\n });\n });\n }\n\n openPopup(options: IOAuth1Options, response: angular.IHttpPromiseCallbackArg): angular.IPromise {\n const popupUrl = [options.authorizationEndpoint, this.buildQueryString(response.data)].join('?');\n\n if (this.$window['cordova']) {\n this.SatellizerPopup.open(popupUrl, options.name, options.popupOptions);\n return this.SatellizerPopup.eventListener(this.defaults.redirectUri);\n } else {\n this.SatellizerPopup.popup.location = popupUrl;\n return this.SatellizerPopup.polling(this.defaults.redirectUri);\n }\n }\n\n getRequestToken(): angular.IHttpPromise {\n const url = this.SatellizerConfig.baseUrl ? joinUrl(this.SatellizerConfig.baseUrl, this.defaults.url) : this.defaults.url;\n return this.$http.post(url, this.defaults);\n }\n\n exchangeForToken(oauthData, userData): angular.IHttpPromise {\n const payload = angular.extend({}, userData, oauthData);\n const exchangeForTokenUrl = this.SatellizerConfig.baseUrl ? joinUrl(this.SatellizerConfig.baseUrl, this.defaults.url) : this.defaults.url;\n return this.$http.post(exchangeForTokenUrl, payload, { withCredentials: this.SatellizerConfig.withCredentials });\n }\n\n buildQueryString(obj): string {\n const str = [];\n angular.forEach(obj, function (value, key) {\n str.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));\n });\n return str.join('&');\n }\n}\n","import { joinUrl } from './utils';\nimport Config from './config';\nimport Popup from './popup';\nimport Storage from './storage';\n\nexport interface IOAuth2Options {\n name: string;\n url: string;\n clientId: string;\n authorizationEndpoint: string;\n redirectUri: string;\n scope: string[];\n scopePrefix: string;\n scopeDelimiter: string;\n state?: string|(() => string);\n requiredUrlParams: string[];\n defaultUrlParams: string[];\n responseType: string;\n responseParams: {\n code: string,\n clientId: string,\n redirectUri: string\n };\n oauthType: string;\n popupOptions: { width: number, height: number };\n}\n\nexport default class OAuth2 {\n static $inject = ['$http', '$window', '$timeout', '$q', 'SatellizerConfig', 'SatellizerPopup', 'SatellizerStorage'];\n\n static camelCase(name): string {\n return name.replace(/([\\:\\-\\_]+(.))/g, (_, separator, letter, offset) => {\n return offset ? letter.toUpperCase() : letter;\n });\n }\n\n public defaults: IOAuth2Options;\n\n constructor(private $http: ng.IHttpService,\n private $window: ng.IWindowService,\n private $timeout: ng.ITimeoutService,\n private $q: angular.IQService,\n private SatellizerConfig: Config,\n private SatellizerPopup: Popup,\n private SatellizerStorage: Storage) {\n\n this.defaults = {\n name: null,\n url: null,\n clientId: null,\n authorizationEndpoint: null,\n redirectUri: null,\n scope: null,\n scopePrefix: null,\n scopeDelimiter: null,\n state: null,\n requiredUrlParams: null,\n defaultUrlParams: ['response_type', 'client_id', 'redirect_uri'],\n responseType: 'code',\n responseParams: {\n code: 'code',\n clientId: 'clientId',\n redirectUri: 'redirectUri'\n },\n oauthType: '2.0',\n popupOptions: { width: null, height: null }\n };\n }\n\n init(options: IOAuth2Options, userData: any): angular.IPromise {\n return this.$q((resolve, reject) => {\n angular.extend(this.defaults, options);\n this.$timeout(() => {\n const stateName = this.defaults.name + '_state';\n const { name, state, popupOptions, redirectUri, responseType } = this.defaults;\n\n if (typeof state === 'function') {\n this.SatellizerStorage.set(stateName, state());\n } else if (typeof state === 'string') {\n this.SatellizerStorage.set(stateName, state);\n }\n const url = [this.defaults.authorizationEndpoint, this.buildQueryString()].join('?');\n\n this.SatellizerPopup.open(url, name, popupOptions);\n\n this.SatellizerPopup.polling(redirectUri).then((oauth: any): void|angular.IPromise|angular.IHttpPromise => {\n\n if (responseType === 'token' || !url) {\n return resolve(oauth);\n }\n\n if (oauth.state && oauth.state !== this.SatellizerStorage.get(stateName)) {\n return reject(new Error(\n 'The value returned in the state parameter does not match the state value from your original ' +\n 'authorization code request.'\n ));\n }\n\n resolve(this.exchangeForToken(oauth, userData));\n })\n .catch(error => reject(error));\n });\n });\n }\n\n exchangeForToken(oauthData: { code?, state? }, userData: any): angular.IHttpPromise {\n const payload = angular.extend({}, userData);\n\n angular.forEach(this.defaults.responseParams, (value, key) => {\n switch (key) {\n case 'code':\n payload[value] = oauthData.code;\n break;\n case 'clientId':\n payload[value] = this.defaults.clientId;\n break;\n case 'redirectUri':\n payload[value] = this.defaults.redirectUri;\n break;\n default:\n payload[value] = oauthData[key];\n }\n });\n\n if (oauthData.state) {\n payload.state = oauthData.state;\n }\n\n let exchangeForTokenUrl = this.SatellizerConfig.baseUrl ?\n joinUrl(this.SatellizerConfig.baseUrl, this.defaults.url) :\n this.defaults.url;\n\n return this.$http.post(exchangeForTokenUrl, payload, { withCredentials: this.SatellizerConfig.withCredentials });\n }\n\n buildQueryString(): string {\n const keyValuePairs = [];\n const urlParamsCategories = ['defaultUrlParams', 'requiredUrlParams', 'optionalUrlParams'];\n\n angular.forEach(urlParamsCategories, (paramsCategory) => {\n angular.forEach(this.defaults[paramsCategory], (paramName) => {\n const camelizedName = OAuth2.camelCase(paramName);\n let paramValue = angular.isFunction(this.defaults[paramName]) ? this.defaults[paramName]() : this.defaults[camelizedName];\n\n if (paramName === 'redirect_uri' && !paramValue) {\n return;\n }\n if (paramName === 'state') {\n const stateName = this.defaults.name + '_state';\n paramValue = encodeURIComponent(this.SatellizerStorage.get(stateName));\n }\n if (paramName === 'scope' && Array.isArray(paramValue)) {\n paramValue = paramValue.join(this.defaults.scopeDelimiter);\n if (this.defaults.scopePrefix) {\n paramValue = [this.defaults.scopePrefix, paramValue].join(this.defaults.scopeDelimiter);\n }\n }\n\n keyValuePairs.push([paramName, paramValue]);\n });\n });\n\n return keyValuePairs.map(pair => pair.join('=')).join('&');\n }\n}\n","import { joinUrl } from './utils';\nimport Config from './config';\nimport Popup from './popup';\nimport Storage from './storage';\nimport Shared from './shared';\nimport OAuth1 from './oauth1';\nimport OAuth2 from './oauth2';\n\nexport default class OAuth {\n static $inject = [\n '$http',\n '$window',\n '$timeout',\n '$q',\n 'SatellizerConfig',\n 'SatellizerPopup',\n 'SatellizerStorage',\n 'SatellizerShared',\n 'SatellizerOAuth1',\n 'SatellizerOAuth2'\n ];\n\n private oauth1: OAuth1;\n private oauth2: OAuth2;\n\n constructor(private $http: ng.IHttpService,\n private $window: ng.IWindowService,\n private $timeout: ng.ITimeoutService,\n private $q: ng.IQService,\n private SatellizerConfig: Config,\n private SatellizerPopup: Popup,\n private SatellizerStorage: Storage,\n private SatellizerShared: Shared,\n private SatellizerOAuth1: OAuth1,\n private SatellizerOAuth2: OAuth2) {}\n\n authenticate(name: string, userData: any): angular.IPromise {\n return this.$q((resolve, reject) => {\n const provider = this.SatellizerConfig.providers[name];\n\n let oauth = null;\n\n switch (provider.oauthType) {\n case '1.0':\n oauth = new OAuth1(this.$http, this.$window, this.SatellizerConfig, this.SatellizerPopup);\n break;\n case '2.0':\n oauth = new OAuth2(this.$http, this.$window, this.$timeout, this.$q, this.SatellizerConfig, this.SatellizerPopup, this.SatellizerStorage);\n break;\n default:\n return reject(new Error('Unknown OAuth Type'));\n }\n\n return oauth.init(provider, userData).then((response) => {\n if (provider.url) {\n this.SatellizerShared.setToken(response);\n }\n resolve(response);\n }).catch((error) => {\n reject(error);\n });\n });\n }\n\n unlink(provider: string, httpOptions: any = {}): angular.IHttpPromise {\n httpOptions.url = httpOptions.url ? httpOptions.url : joinUrl(this.SatellizerConfig.baseUrl, this.SatellizerConfig.unlinkUrl);\n httpOptions.data = { provider: provider } || httpOptions.data;\n httpOptions.method = httpOptions.method || 'POST';\n httpOptions.withCredentials = httpOptions.withCredentials || this.SatellizerConfig.withCredentials;\n\n return this.$http(httpOptions);\n }\n}\n","import Config from './config';\n\nexport default class Storage {\n static $inject = ['$window', 'SatellizerConfig'];\n\n private memoryStore: any;\n private storageType: string;\n\n constructor(private $window: angular.IHttpService,\n private SatellizerConfig: Config) {\n this.memoryStore = {};\n }\n\n get(key: string): string {\n try {\n return this.$window[this.SatellizerConfig.storageType].getItem(key);\n } catch (e) {\n return this.memoryStore[key];\n }\n }\n\n set(key: string, value: string): void {\n try {\n this.$window[this.SatellizerConfig.storageType].setItem(key, value);\n } catch (e) {\n this.memoryStore[key] = value;\n }\n }\n\n remove(key: string): void {\n try {\n this.$window[this.SatellizerConfig.storageType].removeItem(key);\n } catch (e) {\n delete this.memoryStore[key];\n }\n }\n}\n","import Config from './config';\nimport Shared from './shared';\nimport Storage from './storage';\n\nexport default class Interceptor implements angular.IHttpInterceptor {\n\n static $inject = ['SatellizerConfig', 'SatellizerShared', 'SatellizerStorage'];\n\n static Factory(SatellizerConfig: Config, SatellizerShared: Shared, SatellizerStorage: Storage): Interceptor {\n return new Interceptor(SatellizerConfig, SatellizerShared, SatellizerStorage);\n }\n\n constructor(private SatellizerConfig: Config,\n private SatellizerShared: Shared,\n private SatellizerStorage: Storage) {\n }\n\n request = (config: angular.IRequestConfig): angular.IRequestConfig => {\n if (config['skipAuthorization']) {\n return config;\n }\n\n if (this.SatellizerShared.isAuthenticated() && this.SatellizerConfig.httpInterceptor()) {\n const tokenName = this.SatellizerConfig.tokenPrefix ?\n [this.SatellizerConfig.tokenPrefix, this.SatellizerConfig.tokenName].join('_') : this.SatellizerConfig.tokenName;\n let token = this.SatellizerStorage.get(tokenName);\n\n if (this.SatellizerConfig.tokenHeader && this.SatellizerConfig.tokenType) {\n token = this.SatellizerConfig.tokenType + ' ' + token;\n }\n\n config.headers[this.SatellizerConfig.tokenHeader] = token;\n }\n\n return config;\n };\n}\n\nInterceptor.Factory.$inject = ['SatellizerConfig', 'SatellizerShared', 'SatellizerStorage'];","import Interceptor from './interceptor';\n\nexport default class HttpProviderConfig {\n static $inject = ['$httpProvider'];\n\n constructor(private $httpProvider: angular.IHttpProvider) {\n $httpProvider.interceptors.push(Interceptor.Factory);\n }\n}\n","import Config from './config';\nimport AuthProvider from './authProvider';\nimport Shared from './shared';\nimport Local from './local';\nimport Popup from './popup';\nimport OAuth from './oauth';\nimport OAuth2 from './oauth2';\nimport OAuth1 from './oauth1';\nimport Storage from './storage';\nimport Interceptor from './interceptor';\nimport HttpProviderConfig from './httpProviderConfig';\n\nangular.module('satellizer', [])\n .provider('$auth', ['SatellizerConfig', (SatellizerConfig) => new AuthProvider(SatellizerConfig)])\n .constant('SatellizerConfig', Config.getConstant)\n .service('SatellizerShared', Shared)\n .service('SatellizerLocal', Local)\n .service('SatellizerPopup', Popup)\n .service('SatellizerOAuth', OAuth)\n .service('SatellizerOAuth2', OAuth2)\n .service('SatellizerOAuth1', OAuth1)\n .service('SatellizerStorage', Storage)\n .service('SatellizerInterceptor', Interceptor)\n .config(['$httpProvider', ($httpProvider) => new HttpProviderConfig($httpProvider)]);\n\nexport default 'satellizer';\n\n"],"names":[],"mappings":";;;;;;;;;;;;IAAe;QAAA;YAKb,YAAO,GAAG,GAAG,CAAC;YACd,aAAQ,GAAG,aAAa,CAAC;YACzB,cAAS,GAAG,cAAc,CAAC;YAC3B,cAAS,GAAG,eAAe,CAAC;YAC5B,cAAS,GAAG,OAAO,CAAC;YACpB,gBAAW,GAAG,YAAY,CAAC;YAC3B,gBAAW,GAAG,eAAe,CAAC;YAC9B,cAAS,GAAG,QAAQ,CAAC;YACrB,gBAAW,GAAG,cAAc,CAAC;YAC7B,cAAS,GAAG,IAAI,CAAC;YACjB,oBAAe,GAAG,KAAK,CAAC;YACxB,cAAS,GAAG;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,UAAU;oBAChB,GAAG,EAAE,gBAAgB;oBACrB,qBAAqB,EAAE,4CAA4C;oBACnE,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,GAAG;oBACzC,iBAAiB,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC;oBACvC,KAAK,EAAE,CAAC,OAAO,CAAC;oBAChB,cAAc,EAAE,GAAG;oBACnB,OAAO,EAAE,OAAO;oBAChB,SAAS,EAAE,KAAK;oBAChB,YAAY,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;iBAC1C;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,GAAG,EAAE,cAAc;oBACnB,qBAA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SACjC,OAAO,CAAC,kBAAkB,EAAE,MAAM,CAAC;SACnC,OAAO,CAAC,kBAAkB,EAAE,MAAM,CAAC;SACnC,OAAO,CAAC,mBAAmB,EAAE,OAAO,CAAC;SACrC,OAAO,CAAC,uBAAuB,EAAE,WAAW,CAAC;SAC7C,MAAM,CAAC,CAAC,eAAe,EAAE,UAAC,aAAa,IAAK,OAAA,IAAI,kBAAkB,CAAC,aAAa,CAAC,GAAA,CAAC,CAAC,CAAC;AAEvF,cAAe,YAAY,CAAC;;;;"} \ No newline at end of file +{"version":3,"file":null,"sources":["../src/config.ts","../src/authProvider.ts","../src/utils.ts","../src/shared.ts","../src/local.ts","../src/popup.ts","../src/oauth1.ts","../src/oauth2.ts","../src/oauth.ts","../src/storage.ts","../src/interceptor.ts","../src/httpProviderConfig.ts","../src/ng1.ts"],"sourcesContent":["export default class Config {\n static get getConstant() {\n return new Config();\n }\n\n baseUrl = '/';\n loginUrl = '/auth/login';\n signupUrl = '/auth/signup';\n unlinkUrl = '/auth/unlink/';\n tokenName = 'token';\n tokenPrefix = 'satellizer';\n tokenHeader = 'Authorization';\n tokenType = 'Bearer';\n storageType = 'localStorage';\n tokenRoot = null;\n withCredentials = false;\n providers = {\n facebook: {\n name: 'facebook',\n url: '/auth/facebook',\n authorizationEndpoint: 'https://www.facebook.com/v2.5/dialog/oauth',\n redirectUri: window.location.origin + '/',\n requiredUrlParams: ['display', 'scope'],\n scope: ['email'],\n scopeDelimiter: ',',\n display: 'popup',\n oauthType: '2.0',\n popupOptions: { width: 580, height: 400 }\n },\n google: {\n name: 'google',\n url: '/auth/google',\n authorizationEndpoint: 'https://accounts.google.com/o/oauth2/auth',\n redirectUri: window.location.origin,\n requiredUrlParams: ['scope'],\n optionalUrlParams: ['display', 'state'],\n scope: ['profile', 'email'],\n scopePrefix: 'openid',\n scopeDelimiter: ' ',\n display: 'popup',\n oauthType: '2.0',\n popupOptions: { width: 452, height: 633 },\n state: () => encodeURIComponent(Math.random().toString(36).substr(2))\n },\n github: {\n name: 'github',\n url: '/auth/github',\n authorizationEndpoint: 'https://github.com/login/oauth/authorize',\n redirectUri: window.location.origin,\n optionalUrlParams: ['scope'],\n scope: ['user:email'],\n scopeDelimiter: ' ',\n oauthType: '2.0',\n popupOptions: { width: 1020, height: 618 }\n },\n instagram: {\n name: 'instagram',\n url: '/auth/instagram',\n authorizationEndpoint: 'https://api.instagram.com/oauth/authorize',\n redirectUri: window.location.origin,\n requiredUrlParams: ['scope'],\n scope: ['basic'],\n scopeDelimiter: '+',\n oauthType: '2.0'\n },\n linkedin: {\n name: 'linkedin',\n url: '/auth/linkedin',\n authorizationEndpoint: 'https://www.linkedin.com/uas/oauth2/authorization',\n redirectUri: window.location.origin,\n requiredUrlParams: ['state'],\n scope: ['r_emailaddress'],\n scopeDelimiter: ' ',\n state: 'STATE',\n oauthType: '2.0',\n popupOptions: { width: 527, height: 582 }\n },\n twitter: {\n name: 'twitter',\n url: '/auth/twitter',\n authorizationEndpoint: 'https://api.twitter.com/oauth/authenticate',\n redirectUri: window.location.origin,\n oauthType: '1.0',\n popupOptions: { width: 495, height: 645 }\n },\n twitch: {\n name: 'twitch',\n url: '/auth/twitch',\n authorizationEndpoint: 'https://api.twitch.tv/kraken/oauth2/authorize',\n redirectUri: window.location.origin,\n requiredUrlParams: ['scope'],\n scope: ['user_read'],\n scopeDelimiter: ' ',\n display: 'popup',\n oauthType: '2.0',\n popupOptions: { width: 500, height: 560 }\n },\n live: {\n name: 'live',\n url: '/auth/live',\n authorizationEndpoint: 'https://login.live.com/oauth20_authorize.srf',\n redirectUri: window.location.origin,\n requiredUrlParams: ['display', 'scope'],\n scope: ['wl.emails'],\n scopeDelimiter: ' ',\n display: 'popup',\n oauthType: '2.0',\n popupOptions: { width: 500, height: 560 }\n },\n yahoo: {\n name: 'yahoo',\n url: '/auth/yahoo',\n authorizationEndpoint: 'https://api.login.yahoo.com/oauth2/request_auth',\n redirectUri: window.location.origin,\n scope: [],\n scopeDelimiter: ',',\n oauthType: '2.0',\n popupOptions: { width: 559, height: 519 }\n },\n bitbucket: {\n name: 'bitbucket',\n url: '/auth/bitbucket',\n authorizationEndpoint: 'https://bitbucket.org/site/oauth2/authorize',\n redirectUri: window.location.origin + '/',\n requiredUrlParams: ['scope'],\n scope: ['email'],\n scopeDelimiter: ' ',\n oauthType: '2.0',\n popupOptions: { width: 1028, height: 529 }\n }\n };\n httpInterceptor: any = (): boolean => true;\n};\n","import Config from './config';\nimport { IOAuth1Options } from './oauth1';\nimport { IOAuth2Options } from './oauth2';\n\nexport default class AuthProvider {\n static $inject = ['SatellizerConfig'];\n\n constructor(private SatellizerConfig: Config) {}\n\n get baseUrl(): string { return this.SatellizerConfig.baseUrl; }\n set baseUrl(value) { this.SatellizerConfig.baseUrl = value; }\n\n get loginUrl(): string { return this.SatellizerConfig.loginUrl; }\n set loginUrl(value) { this.SatellizerConfig.loginUrl = value; }\n\n get signupUrl(): string { return this.SatellizerConfig.signupUrl; }\n set signupUrl(value) { this.SatellizerConfig.signupUrl = value; }\n\n get unlinkUrl(): string { return this.SatellizerConfig.unlinkUrl; }\n set unlinkUrl(value) { this.SatellizerConfig.unlinkUrl = value; }\n\n get tokenRoot(): string { return this.SatellizerConfig.tokenRoot; }\n set tokenRoot(value) { this.SatellizerConfig.tokenRoot = value; }\n\n get tokenName(): string { return this.SatellizerConfig.tokenName; }\n set tokenName(value) { this.SatellizerConfig.tokenName = value; }\n\n get tokenPrefix(): string { return this.SatellizerConfig.tokenPrefix; }\n set tokenPrefix(value) { this.SatellizerConfig.tokenPrefix = value; }\n\n get tokenHeader(): string { return this.SatellizerConfig.tokenHeader; }\n set tokenHeader(value) { this.SatellizerConfig.tokenHeader = value; }\n\n get tokenType(): string { return this.SatellizerConfig.tokenType; }\n set tokenType(value) { this.SatellizerConfig.tokenType = value; }\n\n get withCredentials(): boolean { return this.SatellizerConfig.withCredentials; }\n set withCredentials(value) { this.SatellizerConfig.withCredentials = value; }\n\n get storageType(): string { return this.SatellizerConfig.storageType; }\n set storageType(value) { this.SatellizerConfig.storageType = value; }\n\n get httpInterceptor(): boolean { return this.SatellizerConfig.httpInterceptor; }\n set httpInterceptor(value) {\n if (typeof value === 'function') {\n this.SatellizerConfig.httpInterceptor = value;\n } else {\n this.SatellizerConfig.httpInterceptor = () => value;\n }\n }\n\n facebook(options: IOAuth2Options): void {\n angular.extend(this.SatellizerConfig.providers.facebook, options);\n }\n\n google(options: IOAuth2Options): void {\n angular.extend(this.SatellizerConfig.providers.google, options);\n }\n\n github(options: IOAuth2Options): void {\n angular.extend(this.SatellizerConfig.providers.github, options);\n }\n\n instagram(options: IOAuth2Options): void {\n angular.extend(this.SatellizerConfig.providers.instagram, options);\n }\n\n linkedin(options: IOAuth2Options): void {\n angular.extend(this.SatellizerConfig.providers.linkedin, options);\n }\n\n twitter(options: IOAuth1Options): void {\n angular.extend(this.SatellizerConfig.providers.twitter, options);\n }\n\n twitch(options: IOAuth2Options): void {\n angular.extend(this.SatellizerConfig.providers.twitch, options);\n }\n\n live(options: IOAuth2Options): void {\n angular.extend(this.SatellizerConfig.providers.live, options);\n }\n\n yahoo(options: IOAuth2Options): void {\n angular.extend(this.SatellizerConfig.providers.yahoo, options);\n }\n\n bitbucket(options: IOAuth2Options): void {\n angular.extend(this.SatellizerConfig.providers.bitbucket, options);\n }\n\n oauth1(options: IOAuth1Options): void {\n this.SatellizerConfig.providers[options.name] = angular.extend(options, {\n oauthType: '1.0'\n });\n }\n\n oauth2(options: IOAuth2Options): void {\n this.SatellizerConfig.providers[options.name] = angular.extend(options, {\n oauthType: '2.0'\n });\n }\n\n $get(SatellizerShared, SatellizerLocal, SatellizerOAuth): any {\n return {\n login: (user, options) => SatellizerLocal.login(user, options),\n signup: (user, options) => SatellizerLocal.signup(user, options),\n logout: () => SatellizerShared.logout(),\n authenticate: (name, data) => SatellizerOAuth.authenticate(name, data),\n link: (name, data) => SatellizerOAuth.authenticate(name, data),\n unlink: (name, options) => SatellizerOAuth.unlink(name, options),\n isAuthenticated: () => SatellizerShared.isAuthenticated(),\n getPayload: () => SatellizerShared.getPayload(),\n getToken: () => SatellizerShared.getToken(),\n setToken: (token) => SatellizerShared.setToken({ access_token: token }),\n removeToken: () => SatellizerShared.removeToken(),\n setStorageType: (type) => SatellizerShared.setStorageType(type)\n };\n }\n}\n\nAuthProvider.prototype.$get.$inject = ['SatellizerShared', 'SatellizerLocal', 'SatellizerOAuth'];","export function joinUrl (baseUrl, url) {\n if (/^(?:[a-z]+:)?\\/\\//i.test(url)) {\n return url;\n }\n let joined = [baseUrl, url].join('/');\n let normalize = function (str) {\n return str\n .replace(/[\\/]+/g, '/')\n .replace(/\\/\\?/g, '?')\n .replace(/\\/\\#/g, '#')\n .replace(/\\:\\//g, '://');\n };\n return normalize(joined);\n}\n\nexport function getFullUrlPath (location) {\n const isHttps = location.protocol === 'https:';\n return location.protocol + '//' + location.hostname +\n ':' + (location.port || (isHttps ? '443' : '80')) +\n (/^\\//.test(location.pathname) ? location.pathname : '/' + location.pathname);\n}\n\nexport function parseQueryString (str) {\n let obj = {};\n let key;\n let value;\n angular.forEach((str || '').split('&'), (keyValue) => {\n if (keyValue) {\n value = keyValue.split('=');\n key = decodeURIComponent(value[0]);\n obj[key] = angular.isDefined(value[1]) ? decodeURIComponent(value[1]) : true;\n }\n });\n return obj;\n}\n\nexport function decodeBase64 (str) {\n let buffer;\n if (typeof module !== 'undefined' && module.exports) {\n try {\n buffer = require('buffer').Buffer;\n } catch (err) {\n // noop\n }\n }\n\n let fromCharCode = String.fromCharCode;\n\n let re_btou = new RegExp([\n '[\\xC0-\\xDF][\\x80-\\xBF]',\n '[\\xE0-\\xEF][\\x80-\\xBF]{2}',\n '[\\xF0-\\xF7][\\x80-\\xBF]{3}'\n ].join('|'), 'g');\n\n let cb_btou = function (cccc) {\n switch (cccc.length) {\n case 4:\n let cp = ((0x07 & cccc.charCodeAt(0)) << 18)\n | ((0x3f & cccc.charCodeAt(1)) << 12)\n | ((0x3f & cccc.charCodeAt(2)) << 6)\n | (0x3f & cccc.charCodeAt(3));\n let offset = cp - 0x10000;\n return (fromCharCode((offset >>> 10) + 0xD800)\n + fromCharCode((offset & 0x3FF) + 0xDC00));\n case 3:\n return fromCharCode(\n ((0x0f & cccc.charCodeAt(0)) << 12)\n | ((0x3f & cccc.charCodeAt(1)) << 6)\n | (0x3f & cccc.charCodeAt(2))\n );\n default:\n return fromCharCode(\n ((0x1f & cccc.charCodeAt(0)) << 6)\n | (0x3f & cccc.charCodeAt(1))\n );\n }\n };\n\n let btou = function (b) {\n return b.replace(re_btou, cb_btou);\n };\n\n let _decode = buffer ? function (a) {\n return (a.constructor === buffer.constructor\n ? a : new buffer(a, 'base64')).toString();\n }\n : function (a) {\n return btou(atob(a));\n };\n\n return _decode(\n String(str).replace(/[-_]/g, function (m0) {\n return m0 === '-' ? '+' : '/';\n })\n .replace(/[^A-Za-z0-9\\+\\/]/g, '')\n );\n}\n","import Config from './config';\nimport Storage from './storage';\nimport { decodeBase64 } from './utils';\n\nclass Shared {\n static $inject = ['$q', '$window', '$log', 'SatellizerConfig', 'SatellizerStorage'];\n \n private prefixedTokenName: string;\n\n constructor(private $q: angular.IQService,\n private $window: angular.IWindowService,\n private $log: angular.ILogService,\n private SatellizerConfig: Config,\n private SatellizerStorage: Storage) {\n const { tokenName, tokenPrefix } = this.SatellizerConfig;\n this.prefixedTokenName = tokenPrefix ? [tokenPrefix, tokenName].join('_') : tokenName;\n }\n\n getToken(): string {\n return this.SatellizerStorage.get(this.prefixedTokenName);\n }\n\n getPayload(): any {\n const token = this.SatellizerStorage.get(this.prefixedTokenName);\n\n if (token && token.split('.').length === 3) {\n try {\n const base64Url = token.split('.')[1];\n const base64 = base64Url.replace('-', '+').replace('_', '/');\n return JSON.parse(decodeBase64(base64));\n } catch (e) {\n // no-op\n }\n }\n }\n\n setToken(response): void {\n if (!response) {\n return this.$log.warn('Can\\'t set token without passing a value');\n }\n\n let token;\n const accessToken = response && response.access_token;\n\n if (accessToken) {\n if (angular.isObject(accessToken) && angular.isObject(accessToken.data)) {\n response = accessToken;\n } else if (angular.isString(accessToken)) {\n token = accessToken;\n }\n }\n\n if (!token && response) {\n const tokenRootData = this.SatellizerConfig.tokenRoot && this.SatellizerConfig.tokenRoot.split('.').reduce(function(o, x) { return o[x]; }, response.data);\n token = tokenRootData ? tokenRootData[this.SatellizerConfig.tokenName] : response.data && response.data[this.SatellizerConfig.tokenName];\n }\n\n if (!token) {\n const tokenPath = this.SatellizerConfig.tokenRoot ? this.SatellizerConfig.tokenRoot + '.' + this.SatellizerConfig.tokenName : this.SatellizerConfig.tokenName;\n return this.$log.warn('Expecting a token named \"' + tokenPath);\n }\n\n this.SatellizerStorage.set(this.prefixedTokenName, token);\n }\n\n removeToken(): void {\n this.SatellizerStorage.remove(this.prefixedTokenName);\n }\n\n isAuthenticated(): boolean {\n const token = this.SatellizerStorage.get(this.prefixedTokenName);\n\n if (token) { // Token is present\n if (token.split('.').length === 3) { // Token with a valid JWT format XXX.YYY.ZZZ\n try { // Could be a valid JWT or an access token with the same format\n const base64Url = token.split('.')[1];\n const base64 = base64Url.replace('-', '+').replace('_', '/');\n const exp = JSON.parse(this.$window.atob(base64)).exp;\n if (exp) { // JWT with an optonal expiration claims\n return (Math.round(new Date().getTime() / 1000) >= exp) ? false : true;\n }\n } catch (e) {\n return true; // Pass: Non-JWT token that looks like JWT\n }\n }\n return true; // Pass: All other tokens\n }\n return false; // Fail: No token at all\n }\n\n logout(): angular.IPromise {\n this.SatellizerStorage.remove(this.prefixedTokenName);\n return this.$q.when();\n }\n\n setStorageType(type): void {\n this.SatellizerConfig.storageType = type;\n }\n}\n\nexport default Shared;\n","import { joinUrl } from './utils';\nimport Config from './config';\nimport Shared from './shared';\n\nclass Local {\n static $inject = ['$http', 'SatellizerConfig', 'SatellizerShared'];\n\n\n constructor(private $http: angular.IHttpService,\n private SatellizerConfig: Config,\n private SatellizerShared: Shared) {}\n\n login(user: string|Object, options: any = {}): angular.IHttpPromise {\n options.url = options.url ? options.url : joinUrl(this.SatellizerConfig.baseUrl, this.SatellizerConfig.loginUrl);\n options.data = user || options.data;\n options.method = options.method || 'POST';\n options.withCredentials = options.withCredentials || this.SatellizerConfig.withCredentials;\n\n return this.$http(options).then((response) => {\n this.SatellizerShared.setToken(response);\n return response;\n });\n }\n\n signup(user: string|Object, options: any = {}): angular.IHttpPromise {\n options.url = options.url ? options.url : joinUrl(this.SatellizerConfig.baseUrl, this.SatellizerConfig.signupUrl);\n options.data = user || options.data;\n options.method = options.method || 'POST';\n options.withCredentials = options.withCredentials || this.SatellizerConfig.withCredentials;\n\n return this.$http(options);\n }\n}\n\nexport default Local;\n","import { parseQueryString, getFullUrlPath } from './utils';\n\nexport interface IPopup {\n open(url: string, name: string, popupOptions: { width: number, height: number }): void;\n stringifyOptions (options: any): string;\n polling(redirectUri: string): angular.IPromise;\n eventListener(redirectUri: string): angular.IPromise;\n}\n\nexport default class Popup implements IPopup {\n static $inject = ['$interval', '$window', '$q'];\n\n public popup: any;\n private url: string;\n private defaults: { redirectUri: string };\n\n constructor(private $interval: angular.IIntervalService,\n private $window: angular.IWindowService,\n private $q: angular.IQService) {\n this.popup = null;\n this.url = 'about:blank'; // TODO remove\n this.defaults = {\n redirectUri: null\n };\n }\n\n stringifyOptions (options: any): string {\n const parts = [];\n angular.forEach(options, function (value, key) {\n parts.push(key + '=' + value);\n });\n return parts.join(',');\n }\n\n open(url: string, name: string, popupOptions: { width: number, height: number }): void {\n this.url = url; // TODO remove\n\n const width = popupOptions.width || 500;\n const height = popupOptions.height || 500;\n\n const options = this.stringifyOptions({\n width: width,\n height: height,\n top: this.$window.screenY + ((this.$window.outerHeight - height) / 2.5),\n left: this.$window.screenX + ((this.$window.outerWidth - width) / 2)\n });\n\n const popupName = this.$window['cordova'] || this.$window.navigator.userAgent.indexOf('CriOS') > -1 ? '_blank' : name;\n\n this.popup = window.open(this.url, popupName, options);\n\n if (this.popup && this.popup.focus) {\n this.popup.focus();\n }\n //\n // if (this.$window['cordova']) {\n // return this.eventListener(this.defaults.redirectUri); // TODO pass redirect uri\n // } else {\n // return this.polling(redirectUri);\n // }\n }\n\n polling(redirectUri: string): angular.IPromise {\n return this.$q((resolve, reject) => {\n const redirectUriParser = document.createElement('a');\n redirectUriParser.href = redirectUri;\n const redirectUriPath = getFullUrlPath(redirectUriParser);\n\n const polling = this.$interval(() => {\n if (!this.popup || this.popup.closed || this.popup.closed === undefined) {\n this.$interval.cancel(polling);\n reject(new Error('The popup window was closed'));\n }\n\n try {\n const popupWindowPath = getFullUrlPath(this.popup.location);\n\n if (popupWindowPath === redirectUriPath) {\n if (this.popup.location.search || this.popup.location.hash) {\n const query = parseQueryString(this.popup.location.search.substring(1).replace(/\\/$/, ''));\n const hash = parseQueryString(this.popup.location.hash.substring(1).replace(/[\\/$]/, ''));\n const params = angular.extend({}, query, hash);\n\n if (params.error) {\n reject(new Error(params.error));\n } else {\n resolve(params);\n }\n } else {\n reject(new Error(\n 'OAuth redirect has occurred but no query or hash parameters were found. ' +\n 'They were either not set during the redirect, or were removed—typically by a ' +\n 'routing library—before Satellizer could read it.'\n ));\n }\n\n this.$interval.cancel(polling);\n this.popup.close();\n }\n } catch (error) {\n // Ignore DOMException: Blocked a frame with origin from accessing a cross-origin frame.\n // A hack to get around same-origin security policy errors in IE.\n }\n }, 500);\n });\n }\n\n eventListener(redirectUri): angular.IPromise {\n return this.$q((resolve, reject) => {\n this.popup.addEventListener('loadstart', (event) => {\n if (!event.url.includes(redirectUri)) {\n return;\n }\n\n const parser = document.createElement('a');\n parser.href = event.url;\n\n if (parser.search || parser.hash) {\n const query = parseQueryString(parser.search.substring(1).replace(/\\/$/, ''));\n const hash = parseQueryString(parser.hash.substring(1).replace(/[\\/$]/, ''));\n const params = angular.extend({}, query, hash);\n\n if (params.error) {\n reject(new Error(params.error));\n } else {\n resolve(params);\n }\n\n this.popup.close();\n }\n });\n\n this.popup.addEventListener('loaderror', () => {\n reject(new Error('Authorization failed'));\n });\n\n this.popup.addEventListener('exit', () => {\n reject(new Error('The popup window was closed'));\n });\n });\n }\n}\n","import { joinUrl } from './utils';\nimport Config from './config';\nimport Popup from './popup';\nimport { IOAuth1Options } from './oauth1';\n\nexport interface IOAuth1 {\n init(options: any, data: any): angular.IPromise;\n getRequestToken(): angular.IHttpPromise;\n openPopup(options: IOAuth1Options, response: angular.IHttpPromiseCallbackArg): angular.IPromise;\n exchangeForToken(oauthData: any, userData: any): angular.IHttpPromise;\n buildQueryString(obj: any): string;\n}\n\nexport interface IOAuth1Options {\n name: string;\n url: string;\n authorizationEndpoint: string;\n redirectUri: string;\n scope: string[];\n scopePrefix: string;\n scopeDelimiter: string;\n requiredUrlParams: string[];\n defaultUrlParams: string[];\n oauthType: string;\n popupOptions: { width: number, height: number };\n}\n\nexport default class OAuth1 implements IOAuth1 {\n static $inject = ['$http', '$window', 'SatellizerConfig', 'SatellizerPopup'];\n\n private defaults: IOAuth1Options;\n\n constructor(private $http: ng.IHttpService,\n private $window: ng.IWindowService,\n private SatellizerConfig: Config,\n private SatellizerPopup: Popup) {\n\n this.defaults = {\n name: null,\n url: null,\n authorizationEndpoint: null,\n scope: null,\n scopePrefix: null,\n scopeDelimiter: null,\n redirectUri: null,\n requiredUrlParams: null,\n defaultUrlParams: null,\n oauthType: '1.0',\n popupOptions: { width: null, height: null }\n };\n };\n\n init(options: IOAuth1Options, userData: any): angular.IHttpPromise {\n angular.extend(this.defaults, options);\n\n if (!this.$window['cordova']) {\n this.SatellizerPopup.open('about:blank', options.name, options.popupOptions);\n }\n\n return this.getRequestToken().then((response) => {\n return this.openPopup(options, response).then((popupResponse) => {\n return this.exchangeForToken(popupResponse, userData);\n });\n });\n }\n\n openPopup(options: IOAuth1Options, response: angular.IHttpPromiseCallbackArg): angular.IPromise {\n const popupUrl = [options.authorizationEndpoint, this.buildQueryString(response.data)].join('?');\n\n if (this.$window['cordova']) {\n this.SatellizerPopup.open(popupUrl, options.name, options.popupOptions);\n return this.SatellizerPopup.eventListener(this.defaults.redirectUri);\n } else {\n this.SatellizerPopup.popup.location = popupUrl;\n return this.SatellizerPopup.polling(this.defaults.redirectUri);\n }\n }\n\n getRequestToken(): angular.IHttpPromise {\n const url = this.SatellizerConfig.baseUrl ? joinUrl(this.SatellizerConfig.baseUrl, this.defaults.url) : this.defaults.url;\n return this.$http.post(url, this.defaults);\n }\n\n exchangeForToken(oauthData, userData): angular.IHttpPromise {\n const payload = angular.extend({}, userData, oauthData);\n const exchangeForTokenUrl = this.SatellizerConfig.baseUrl ? joinUrl(this.SatellizerConfig.baseUrl, this.defaults.url) : this.defaults.url;\n return this.$http.post(exchangeForTokenUrl, payload, { withCredentials: this.SatellizerConfig.withCredentials });\n }\n\n buildQueryString(obj): string {\n const str = [];\n angular.forEach(obj, function (value, key) {\n str.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));\n });\n return str.join('&');\n }\n}\n","import { joinUrl } from './utils';\nimport Config from './config';\nimport Popup from './popup';\nimport Storage from './storage';\n\nexport interface IOAuth2Options {\n name: string;\n url: string;\n clientId: string;\n authorizationEndpoint: string;\n redirectUri: string;\n scope: string[];\n scopePrefix: string;\n scopeDelimiter: string;\n state?: string|(() => string);\n requiredUrlParams: string[];\n defaultUrlParams: string[];\n responseType: string;\n responseParams: {\n code: string,\n clientId: string,\n redirectUri: string\n };\n oauthType: string;\n popupOptions: { width: number, height: number };\n}\n\nexport default class OAuth2 {\n static $inject = ['$http', '$window', '$timeout', '$q', 'SatellizerConfig', 'SatellizerPopup', 'SatellizerStorage'];\n\n static camelCase(name): string {\n return name.replace(/([\\:\\-\\_]+(.))/g, (_, separator, letter, offset) => {\n return offset ? letter.toUpperCase() : letter;\n });\n }\n\n public defaults: IOAuth2Options;\n\n constructor(private $http: ng.IHttpService,\n private $window: ng.IWindowService,\n private $timeout: ng.ITimeoutService,\n private $q: angular.IQService,\n private SatellizerConfig: Config,\n private SatellizerPopup: Popup,\n private SatellizerStorage: Storage) {\n\n this.defaults = {\n name: null,\n url: null,\n clientId: null,\n authorizationEndpoint: null,\n redirectUri: null,\n scope: null,\n scopePrefix: null,\n scopeDelimiter: null,\n state: null,\n requiredUrlParams: null,\n defaultUrlParams: ['response_type', 'client_id', 'redirect_uri'],\n responseType: 'code',\n responseParams: {\n code: 'code',\n clientId: 'clientId',\n redirectUri: 'redirectUri'\n },\n oauthType: '2.0',\n popupOptions: { width: null, height: null }\n };\n }\n\n init(options: IOAuth2Options, userData: any): angular.IPromise {\n return this.$q((resolve, reject) => {\n angular.extend(this.defaults, options);\n this.$timeout(() => {\n const stateName = this.defaults.name + '_state';\n const { name, state, popupOptions, redirectUri, responseType } = this.defaults;\n\n if (typeof state === 'function') {\n this.SatellizerStorage.set(stateName, state());\n } else if (typeof state === 'string') {\n this.SatellizerStorage.set(stateName, state);\n }\n const url = [this.defaults.authorizationEndpoint, this.buildQueryString()].join('?');\n\n this.SatellizerPopup.open(url, name, popupOptions);\n\n this.SatellizerPopup.polling(redirectUri).then((oauth: any): void|angular.IPromise|angular.IHttpPromise => {\n\n if (responseType === 'token' || !url) {\n return resolve(oauth);\n }\n\n if (oauth.state && oauth.state !== this.SatellizerStorage.get(stateName)) {\n return reject(new Error(\n 'The value returned in the state parameter does not match the state value from your original ' +\n 'authorization code request.'\n ));\n }\n\n resolve(this.exchangeForToken(oauth, userData));\n })\n .catch(error => reject(error));\n });\n });\n }\n\n exchangeForToken(oauthData: { code?, state? }, userData: any): angular.IHttpPromise {\n const payload = angular.extend({}, userData);\n\n angular.forEach(this.defaults.responseParams, (value, key) => {\n switch (key) {\n case 'code':\n payload[value] = oauthData.code;\n break;\n case 'clientId':\n payload[value] = this.defaults.clientId;\n break;\n case 'redirectUri':\n payload[value] = this.defaults.redirectUri;\n break;\n default:\n payload[value] = oauthData[key];\n }\n });\n\n if (oauthData.state) {\n payload.state = oauthData.state;\n }\n\n let exchangeForTokenUrl = this.SatellizerConfig.baseUrl ?\n joinUrl(this.SatellizerConfig.baseUrl, this.defaults.url) :\n this.defaults.url;\n\n return this.$http.post(exchangeForTokenUrl, payload, { withCredentials: this.SatellizerConfig.withCredentials });\n }\n\n buildQueryString(): string {\n const keyValuePairs = [];\n const urlParamsCategories = ['defaultUrlParams', 'requiredUrlParams', 'optionalUrlParams'];\n\n angular.forEach(urlParamsCategories, (paramsCategory) => {\n angular.forEach(this.defaults[paramsCategory], (paramName) => {\n const camelizedName = OAuth2.camelCase(paramName);\n let paramValue = angular.isFunction(this.defaults[paramName]) ? this.defaults[paramName]() : this.defaults[camelizedName];\n\n if (paramName === 'redirect_uri' && !paramValue) {\n return;\n }\n if (paramName === 'state') {\n const stateName = this.defaults.name + '_state';\n paramValue = encodeURIComponent(this.SatellizerStorage.get(stateName));\n }\n if (paramName === 'scope' && Array.isArray(paramValue)) {\n paramValue = paramValue.join(this.defaults.scopeDelimiter);\n if (this.defaults.scopePrefix) {\n paramValue = [this.defaults.scopePrefix, paramValue].join(this.defaults.scopeDelimiter);\n }\n }\n\n keyValuePairs.push([paramName, paramValue]);\n });\n });\n\n return keyValuePairs.map(pair => pair.join('=')).join('&');\n }\n}\n","import { joinUrl } from './utils';\nimport Config from './config';\nimport Popup from './popup';\nimport Storage from './storage';\nimport Shared from './shared';\nimport OAuth1 from './oauth1';\nimport OAuth2 from './oauth2';\n\nexport default class OAuth {\n static $inject = [\n '$http',\n '$window',\n '$timeout',\n '$q',\n 'SatellizerConfig',\n 'SatellizerPopup',\n 'SatellizerStorage',\n 'SatellizerShared',\n 'SatellizerOAuth1',\n 'SatellizerOAuth2'\n ];\n\n private oauth1: OAuth1;\n private oauth2: OAuth2;\n\n constructor(private $http: ng.IHttpService,\n private $window: ng.IWindowService,\n private $timeout: ng.ITimeoutService,\n private $q: ng.IQService,\n private SatellizerConfig: Config,\n private SatellizerPopup: Popup,\n private SatellizerStorage: Storage,\n private SatellizerShared: Shared,\n private SatellizerOAuth1: OAuth1,\n private SatellizerOAuth2: OAuth2) {}\n\n authenticate(name: string, userData: any): angular.IPromise {\n return this.$q((resolve, reject) => {\n const provider = this.SatellizerConfig.providers[name];\n\n let oauth = null;\n\n switch (provider.oauthType) {\n case '1.0':\n oauth = new OAuth1(this.$http, this.$window, this.SatellizerConfig, this.SatellizerPopup);\n break;\n case '2.0':\n oauth = new OAuth2(this.$http, this.$window, this.$timeout, this.$q, this.SatellizerConfig, this.SatellizerPopup, this.SatellizerStorage);\n break;\n default:\n return reject(new Error('Unknown OAuth Type'));\n }\n\n return oauth.init(provider, userData).then((response) => {\n if (provider.url) {\n this.SatellizerShared.setToken(response);\n }\n resolve(response);\n }).catch((error) => {\n reject(error);\n });\n });\n }\n\n unlink(provider: string, httpOptions: any = {}): angular.IHttpPromise {\n httpOptions.url = httpOptions.url ? httpOptions.url : joinUrl(this.SatellizerConfig.baseUrl, this.SatellizerConfig.unlinkUrl);\n httpOptions.data = { provider: provider } || httpOptions.data;\n httpOptions.method = httpOptions.method || 'POST';\n httpOptions.withCredentials = httpOptions.withCredentials || this.SatellizerConfig.withCredentials;\n\n return this.$http(httpOptions);\n }\n}\n","import Config from './config';\n\nexport default class Storage {\n static $inject = ['$window', 'SatellizerConfig'];\n\n private memoryStore: any;\n private storageType: string;\n\n constructor(private $window: angular.IHttpService,\n private SatellizerConfig: Config) {\n this.memoryStore = {};\n }\n\n get(key: string): string {\n try {\n return this.$window[this.SatellizerConfig.storageType].getItem(key);\n } catch (e) {\n return this.memoryStore[key];\n }\n }\n\n set(key: string, value: string): void {\n try {\n this.$window[this.SatellizerConfig.storageType].setItem(key, value);\n } catch (e) {\n this.memoryStore[key] = value;\n }\n }\n\n remove(key: string): void {\n try {\n this.$window[this.SatellizerConfig.storageType].removeItem(key);\n } catch (e) {\n delete this.memoryStore[key];\n }\n }\n}\n","import Config from './config';\nimport Shared from './shared';\nimport Storage from './storage';\n\nexport default class Interceptor implements angular.IHttpInterceptor {\n\n static $inject = ['SatellizerConfig', 'SatellizerShared', 'SatellizerStorage'];\n\n static Factory(SatellizerConfig: Config, SatellizerShared: Shared, SatellizerStorage: Storage): Interceptor {\n return new Interceptor(SatellizerConfig, SatellizerShared, SatellizerStorage);\n }\n\n constructor(private SatellizerConfig: Config,\n private SatellizerShared: Shared,\n private SatellizerStorage: Storage) {\n }\n\n request = (config: angular.IRequestConfig): angular.IRequestConfig => {\n if (config['skipAuthorization']) {\n return config;\n }\n\n if (this.SatellizerShared.isAuthenticated() && this.SatellizerConfig.httpInterceptor()) {\n const tokenName = this.SatellizerConfig.tokenPrefix ?\n [this.SatellizerConfig.tokenPrefix, this.SatellizerConfig.tokenName].join('_') : this.SatellizerConfig.tokenName;\n let token = this.SatellizerStorage.get(tokenName);\n\n if (this.SatellizerConfig.tokenHeader && this.SatellizerConfig.tokenType) {\n token = this.SatellizerConfig.tokenType + ' ' + token;\n }\n\n config.headers[this.SatellizerConfig.tokenHeader] = token;\n }\n\n return config;\n };\n}\n\nInterceptor.Factory.$inject = ['SatellizerConfig', 'SatellizerShared', 'SatellizerStorage'];","import Interceptor from './interceptor';\n\nexport default class HttpProviderConfig {\n static $inject = ['$httpProvider'];\n\n constructor(private $httpProvider: angular.IHttpProvider) {\n $httpProvider.interceptors.push(Interceptor.Factory);\n }\n}\n","import Config from './config';\nimport AuthProvider from './authProvider';\nimport Shared from './shared';\nimport Local from './local';\nimport Popup from './popup';\nimport OAuth from './oauth';\nimport OAuth2 from './oauth2';\nimport OAuth1 from './oauth1';\nimport Storage from './storage';\nimport Interceptor from './interceptor';\nimport HttpProviderConfig from './httpProviderConfig';\n\nangular.module('satellizer', [])\n .provider('$auth', ['SatellizerConfig', (SatellizerConfig) => new AuthProvider(SatellizerConfig)])\n .constant('SatellizerConfig', Config.getConstant)\n .service('SatellizerShared', Shared)\n .service('SatellizerLocal', Local)\n .service('SatellizerPopup', Popup)\n .service('SatellizerOAuth', OAuth)\n .service('SatellizerOAuth2', OAuth2)\n .service('SatellizerOAuth1', OAuth1)\n .service('SatellizerStorage', Storage)\n .service('SatellizerInterceptor', Interceptor)\n .config(['$httpProvider', ($httpProvider) => new HttpProviderConfig($httpPro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Y,CAAC;;;;"} \ No newline at end of file diff --git a/examples/client/vendor/satellizer.js b/examples/client/vendor/satellizer.js index b29e28f2..49ff9849 100644 --- a/examples/client/vendor/satellizer.js +++ b/examples/client/vendor/satellizer.js @@ -1,5 +1,5 @@ /** - * Satellizer 0.15.3 + * Satellizer 0.15.4 * (c) 2016 Sahat Yalkabov * License: MIT */ diff --git a/examples/server/php/public/vendor/satellizer.js b/examples/server/php/public/vendor/satellizer.js index b29e28f2..49ff9849 100644 --- a/examples/server/php/public/vendor/satellizer.js +++ b/examples/server/php/public/vendor/satellizer.js @@ -1,5 +1,5 @@ /** - * Satellizer 0.15.3 + * Satellizer 0.15.4 * (c) 2016 Sahat Yalkabov * License: MIT */ diff --git a/package.json b/package.json index 6202c26b..fa3464b8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "satellizer", "description": "Token-based AngularJS Authentication", - "version": "0.15.3", + "version": "0.15.4", "main": "dist/satellizer.js", "scripts": { "start": "supervisor ./examples/server/node/server.js",