diff --git a/dist/amd/aurelia-authentication.d.ts b/dist/amd/aurelia-authentication.d.ts index 7798028..b88c6c1 100644 --- a/dist/amd/aurelia-authentication.d.ts +++ b/dist/amd/aurelia-authentication.d.ts @@ -12,12 +12,25 @@ declare module 'aurelia-authentication' { import { Redirect } from 'aurelia-router'; + export class authUtils { + static isDefined(value: any): any; + static camelCase(name: any): any; + static parseQueryString(keyValue: any): any; + static isString(value: any): any; + static isObject(value: any): any; + static isArray: any; + static isFunction(value: any): any; + static joinUrl(baseUrl: any, url: any): any; + static isBlankObject(value: any): any; + static isArrayLike(obj: any): any; + static isWindow(obj: any): any; + static extend(dst: any): any; + static merge(dst: any): any; + static forEach(obj: any, iterator: any, context: any): any; + } export class AuthFilterValueConverter { toView(routes: any, isAuthenticated: any): any; } - export { - authUtils - }; export class BaseConfig { configure(incomingConfig: any): any; current: any; diff --git a/dist/amd/authUtils.js b/dist/amd/authUtils.js index 8114747..ce85218 100644 --- a/dist/amd/authUtils.js +++ b/dist/amd/authUtils.js @@ -11,6 +11,14 @@ define(['exports'], function (exports) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + + var _class, _temp; + var slice = [].slice; function setHashKey(obj, h) { @@ -49,18 +57,22 @@ define(['exports'], function (exports) { return dst; } - var authUtils = { - isDefined: function isDefined(value) { + var authUtils = exports.authUtils = (_temp = _class = function () { + function authUtils() { + _classCallCheck(this, authUtils); + } + + authUtils.isDefined = function isDefined(value) { return typeof value !== 'undefined'; - }, + }; - camelCase: function camelCase(name) { + authUtils.camelCase = function camelCase(name) { return name.replace(/([\:\-\_]+(.))/g, function (_, separator, letter, offset) { return offset ? letter.toUpperCase() : letter; }); - }, + }; - parseQueryString: function parseQueryString(keyValue) { + authUtils.parseQueryString = function parseQueryString(keyValue) { var obj = {}; var key = void 0; var value = void 0; @@ -73,22 +85,21 @@ define(['exports'], function (exports) { } }); return obj; - }, + }; - isString: function isString(value) { + authUtils.isString = function isString(value) { return typeof value === 'string'; - }, + }; - isObject: function isObject(value) { + authUtils.isObject = function isObject(value) { return value !== null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object'; - }, - isArray: Array.isArray, + }; - isFunction: function isFunction(value) { + authUtils.isFunction = function isFunction(value) { return typeof value === 'function'; - }, + }; - joinUrl: function joinUrl(baseUrl, url) { + authUtils.joinUrl = function joinUrl(baseUrl, url) { if (/^(?:[a-z]+:)?\/\//i.test(url)) { return url; } @@ -100,25 +111,31 @@ define(['exports'], function (exports) { }; return normalize(joined); - }, - isBlankObject: function isBlankObject(value) { + }; + + authUtils.isBlankObject = function isBlankObject(value) { return value !== null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && !Object.getPrototypeOf(value); - }, - isArrayLike: function isArrayLike(obj) { + }; + + authUtils.isArrayLike = function isArrayLike(obj) { if (obj === null || authUtils.isWindow(obj)) { return false; } - }, - isWindow: function isWindow(obj) { + }; + + authUtils.isWindow = function isWindow(obj) { return obj && obj.window === obj; - }, - extend: function extend(dst) { + }; + + authUtils.extend = function extend(dst) { return baseExtend(dst, slice.call(arguments, 1), false); - }, - merge: function merge(dst) { + }; + + authUtils.merge = function merge(dst) { return baseExtend(dst, slice.call(arguments, 1), true); - }, - forEach: function (_forEach) { + }; + + authUtils.forEach = function (_forEach) { function forEach(_x, _x2, _x3) { return _forEach.apply(this, arguments); } @@ -168,9 +185,8 @@ define(['exports'], function (exports) { } } } - }) - - }; + }); - exports.authUtils = authUtils; + return authUtils; + }(), _class.isArray = Array.isArray, _temp); }); \ No newline at end of file diff --git a/dist/amd/baseConfig.js b/dist/amd/baseConfig.js index 216e6e5..e1dd981 100644 --- a/dist/amd/baseConfig.js +++ b/dist/amd/baseConfig.js @@ -62,15 +62,15 @@ define(['exports', './authUtils'], function (exports, _authUtils) { signupRedirect: '#/login', - baseUrl: '/auth', + baseUrl: '', - loginUrl: '/login', + loginUrl: '/auth/login', - signupUrl: '/signup', + signupUrl: '/auth/signup', - profileUrl: '/me', + profileUrl: '/auth/me', - unlinkUrl: '/unlink/', + unlinkUrl: '/auth/unlink/', unlinkMethod: 'get', @@ -97,7 +97,7 @@ define(['exports', './authUtils'], function (exports, _authUtils) { providers: { google: { name: 'google', - url: '/google', + url: '/auth/google', authorizationEndpoint: 'https://accounts.google.com/o/oauth2/auth', redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host, scope: ['profile', 'email'], @@ -115,7 +115,7 @@ define(['exports', './authUtils'], function (exports, _authUtils) { }, facebook: { name: 'facebook', - url: '/facebook', + url: '/auth/facebook', authorizationEndpoint: 'https://www.facebook.com/v2.3/dialog/oauth', redirectUri: window.location.origin + '/' || window.location.protocol + '//' + window.location.host + '/', scope: ['email'], @@ -133,7 +133,7 @@ define(['exports', './authUtils'], function (exports, _authUtils) { }, linkedin: { name: 'linkedin', - url: '/linkedin', + url: '/auth/linkedin', authorizationEndpoint: 'https://www.linkedin.com/uas/oauth2/authorization', redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host, requiredUrlParams: ['state'], @@ -148,7 +148,7 @@ define(['exports', './authUtils'], function (exports, _authUtils) { }, github: { name: 'github', - url: '/github', + url: '/auth/github', authorizationEndpoint: 'https://github.com/login/oauth/authorize', redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host, optionalUrlParams: ['scope'], @@ -162,7 +162,7 @@ define(['exports', './authUtils'], function (exports, _authUtils) { }, yahoo: { name: 'yahoo', - url: '/yahoo', + url: '/auth/yahoo', authorizationEndpoint: 'https://api.login.yahoo.com/oauth2/request_auth', redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host, scope: [], @@ -175,7 +175,7 @@ define(['exports', './authUtils'], function (exports, _authUtils) { }, twitter: { name: 'twitter', - url: '/twitter', + url: '/auth/twitter', authorizationEndpoint: 'https://api.twitter.com/oauth/authenticate', type: '1.0', popupOptions: { @@ -200,7 +200,7 @@ define(['exports', './authUtils'], function (exports, _authUtils) { }, instagram: { name: 'instagram', - url: '/instagram', + url: '/auth/instagram', authorizationEndpoint: 'https://api.instagram.com/oauth/authorize', redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host, requiredUrlParams: ['scope'], diff --git a/dist/commonjs/aurelia-authentication.d.ts b/dist/commonjs/aurelia-authentication.d.ts index 7798028..b88c6c1 100644 --- a/dist/commonjs/aurelia-authentication.d.ts +++ b/dist/commonjs/aurelia-authentication.d.ts @@ -12,12 +12,25 @@ declare module 'aurelia-authentication' { import { Redirect } from 'aurelia-router'; + export class authUtils { + static isDefined(value: any): any; + static camelCase(name: any): any; + static parseQueryString(keyValue: any): any; + static isString(value: any): any; + static isObject(value: any): any; + static isArray: any; + static isFunction(value: any): any; + static joinUrl(baseUrl: any, url: any): any; + static isBlankObject(value: any): any; + static isArrayLike(obj: any): any; + static isWindow(obj: any): any; + static extend(dst: any): any; + static merge(dst: any): any; + static forEach(obj: any, iterator: any, context: any): any; + } export class AuthFilterValueConverter { toView(routes: any, isAuthenticated: any): any; } - export { - authUtils - }; export class BaseConfig { configure(incomingConfig: any): any; current: any; diff --git a/dist/commonjs/authUtils.js b/dist/commonjs/authUtils.js index ecc5461..77eaeed 100644 --- a/dist/commonjs/authUtils.js +++ b/dist/commonjs/authUtils.js @@ -6,6 +6,10 @@ Object.defineProperty(exports, "__esModule", { var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; +var _class, _temp; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + var slice = [].slice; function setHashKey(obj, h) { @@ -44,18 +48,22 @@ function baseExtend(dst, objs, deep) { return dst; } -var authUtils = { - isDefined: function isDefined(value) { +var authUtils = exports.authUtils = (_temp = _class = function () { + function authUtils() { + _classCallCheck(this, authUtils); + } + + authUtils.isDefined = function isDefined(value) { return typeof value !== 'undefined'; - }, + }; - camelCase: function camelCase(name) { + authUtils.camelCase = function camelCase(name) { return name.replace(/([\:\-\_]+(.))/g, function (_, separator, letter, offset) { return offset ? letter.toUpperCase() : letter; }); - }, + }; - parseQueryString: function parseQueryString(keyValue) { + authUtils.parseQueryString = function parseQueryString(keyValue) { var obj = {}; var key = void 0; var value = void 0; @@ -68,22 +76,21 @@ var authUtils = { } }); return obj; - }, + }; - isString: function isString(value) { + authUtils.isString = function isString(value) { return typeof value === 'string'; - }, + }; - isObject: function isObject(value) { + authUtils.isObject = function isObject(value) { return value !== null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object'; - }, - isArray: Array.isArray, + }; - isFunction: function isFunction(value) { + authUtils.isFunction = function isFunction(value) { return typeof value === 'function'; - }, + }; - joinUrl: function joinUrl(baseUrl, url) { + authUtils.joinUrl = function joinUrl(baseUrl, url) { if (/^(?:[a-z]+:)?\/\//i.test(url)) { return url; } @@ -95,25 +102,31 @@ var authUtils = { }; return normalize(joined); - }, - isBlankObject: function isBlankObject(value) { + }; + + authUtils.isBlankObject = function isBlankObject(value) { return value !== null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && !Object.getPrototypeOf(value); - }, - isArrayLike: function isArrayLike(obj) { + }; + + authUtils.isArrayLike = function isArrayLike(obj) { if (obj === null || authUtils.isWindow(obj)) { return false; } - }, - isWindow: function isWindow(obj) { + }; + + authUtils.isWindow = function isWindow(obj) { return obj && obj.window === obj; - }, - extend: function extend(dst) { + }; + + authUtils.extend = function extend(dst) { return baseExtend(dst, slice.call(arguments, 1), false); - }, - merge: function merge(dst) { + }; + + authUtils.merge = function merge(dst) { return baseExtend(dst, slice.call(arguments, 1), true); - }, - forEach: function (_forEach) { + }; + + authUtils.forEach = function (_forEach) { function forEach(_x, _x2, _x3) { return _forEach.apply(this, arguments); } @@ -163,8 +176,7 @@ var authUtils = { } } } - }) - -}; + }); -exports.authUtils = authUtils; \ No newline at end of file + return authUtils; +}(), _class.isArray = Array.isArray, _temp); \ No newline at end of file diff --git a/dist/commonjs/baseConfig.js b/dist/commonjs/baseConfig.js index 38b46d6..43c1493 100644 --- a/dist/commonjs/baseConfig.js +++ b/dist/commonjs/baseConfig.js @@ -43,15 +43,15 @@ var BaseConfig = exports.BaseConfig = function () { signupRedirect: '#/login', - baseUrl: '/auth', + baseUrl: '', - loginUrl: '/login', + loginUrl: '/auth/login', - signupUrl: '/signup', + signupUrl: '/auth/signup', - profileUrl: '/me', + profileUrl: '/auth/me', - unlinkUrl: '/unlink/', + unlinkUrl: '/auth/unlink/', unlinkMethod: 'get', @@ -78,7 +78,7 @@ var BaseConfig = exports.BaseConfig = function () { providers: { google: { name: 'google', - url: '/google', + url: '/auth/google', authorizationEndpoint: 'https://accounts.google.com/o/oauth2/auth', redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host, scope: ['profile', 'email'], @@ -96,7 +96,7 @@ var BaseConfig = exports.BaseConfig = function () { }, facebook: { name: 'facebook', - url: '/facebook', + url: '/auth/facebook', authorizationEndpoint: 'https://www.facebook.com/v2.3/dialog/oauth', redirectUri: window.location.origin + '/' || window.location.protocol + '//' + window.location.host + '/', scope: ['email'], @@ -114,7 +114,7 @@ var BaseConfig = exports.BaseConfig = function () { }, linkedin: { name: 'linkedin', - url: '/linkedin', + url: '/auth/linkedin', authorizationEndpoint: 'https://www.linkedin.com/uas/oauth2/authorization', redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host, requiredUrlParams: ['state'], @@ -129,7 +129,7 @@ var BaseConfig = exports.BaseConfig = function () { }, github: { name: 'github', - url: '/github', + url: '/auth/github', authorizationEndpoint: 'https://github.com/login/oauth/authorize', redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host, optionalUrlParams: ['scope'], @@ -143,7 +143,7 @@ var BaseConfig = exports.BaseConfig = function () { }, yahoo: { name: 'yahoo', - url: '/yahoo', + url: '/auth/yahoo', authorizationEndpoint: 'https://api.login.yahoo.com/oauth2/request_auth', redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host, scope: [], @@ -156,7 +156,7 @@ var BaseConfig = exports.BaseConfig = function () { }, twitter: { name: 'twitter', - url: '/twitter', + url: '/auth/twitter', authorizationEndpoint: 'https://api.twitter.com/oauth/authenticate', type: '1.0', popupOptions: { @@ -181,7 +181,7 @@ var BaseConfig = exports.BaseConfig = function () { }, instagram: { name: 'instagram', - url: '/instagram', + url: '/auth/instagram', authorizationEndpoint: 'https://api.instagram.com/oauth/authorize', redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host, requiredUrlParams: ['scope'], diff --git a/dist/es2015/aurelia-authentication.d.ts b/dist/es2015/aurelia-authentication.d.ts index 7798028..b88c6c1 100644 --- a/dist/es2015/aurelia-authentication.d.ts +++ b/dist/es2015/aurelia-authentication.d.ts @@ -12,12 +12,25 @@ declare module 'aurelia-authentication' { import { Redirect } from 'aurelia-router'; + export class authUtils { + static isDefined(value: any): any; + static camelCase(name: any): any; + static parseQueryString(keyValue: any): any; + static isString(value: any): any; + static isObject(value: any): any; + static isArray: any; + static isFunction(value: any): any; + static joinUrl(baseUrl: any, url: any): any; + static isBlankObject(value: any): any; + static isArrayLike(obj: any): any; + static isWindow(obj: any): any; + static extend(dst: any): any; + static merge(dst: any): any; + static forEach(obj: any, iterator: any, context: any): any; + } export class AuthFilterValueConverter { toView(routes: any, isAuthenticated: any): any; } - export { - authUtils - }; export class BaseConfig { configure(incomingConfig: any): any; current: any; diff --git a/dist/es2015/authUtils.js b/dist/es2015/authUtils.js index 09019b3..666f13a 100644 --- a/dist/es2015/authUtils.js +++ b/dist/es2015/authUtils.js @@ -1,3 +1,5 @@ +var _class, _temp; + let slice = [].slice; function setHashKey(obj, h) { @@ -36,18 +38,18 @@ function baseExtend(dst, objs, deep) { return dst; } -let authUtils = { - isDefined: function (value) { +export let authUtils = (_temp = _class = class authUtils { + static isDefined(value) { return typeof value !== 'undefined'; - }, + } - camelCase: function (name) { + static camelCase(name) { return name.replace(/([\:\-\_]+(.))/g, function (_, separator, letter, offset) { return offset ? letter.toUpperCase() : letter; }); - }, + } - parseQueryString: function (keyValue) { + static parseQueryString(keyValue) { let obj = {}; let key; let value; @@ -60,22 +62,21 @@ let authUtils = { } }); return obj; - }, + } - isString: function (value) { + static isString(value) { return typeof value === 'string'; - }, + } - isObject: function (value) { + static isObject(value) { return value !== null && typeof value === 'object'; - }, - isArray: Array.isArray, + } - isFunction: function (value) { + static isFunction(value) { return typeof value === 'function'; - }, + } - joinUrl: function (baseUrl, url) { + static joinUrl(baseUrl, url) { if (/^(?:[a-z]+:)?\/\//i.test(url)) { return url; } @@ -87,25 +88,31 @@ let authUtils = { }; return normalize(joined); - }, - isBlankObject: function (value) { + } + + static isBlankObject(value) { return value !== null && typeof value === 'object' && !Object.getPrototypeOf(value); - }, - isArrayLike: function (obj) { + } + + static isArrayLike(obj) { if (obj === null || authUtils.isWindow(obj)) { return false; } - }, - isWindow: function (obj) { + } + + static isWindow(obj) { return obj && obj.window === obj; - }, - extend: function (dst) { + } + + static extend(dst) { return baseExtend(dst, slice.call(arguments, 1), false); - }, - merge: function merge(dst) { + } + + static merge(dst) { return baseExtend(dst, slice.call(arguments, 1), true); - }, - forEach: function (obj, iterator, context) { + } + + static forEach(obj, iterator, context) { let key; let length; @@ -146,7 +153,4 @@ let authUtils = { } } } - -}; - -export { authUtils }; \ No newline at end of file +}, _class.isArray = Array.isArray, _temp); \ No newline at end of file diff --git a/dist/es2015/baseConfig.js b/dist/es2015/baseConfig.js index f3696f2..438aa76 100644 --- a/dist/es2015/baseConfig.js +++ b/dist/es2015/baseConfig.js @@ -27,15 +27,15 @@ export let BaseConfig = class BaseConfig { signupRedirect: '#/login', - baseUrl: '/auth', + baseUrl: '', - loginUrl: '/login', + loginUrl: '/auth/login', - signupUrl: '/signup', + signupUrl: '/auth/signup', - profileUrl: '/me', + profileUrl: '/auth/me', - unlinkUrl: '/unlink/', + unlinkUrl: '/auth/unlink/', unlinkMethod: 'get', @@ -62,7 +62,7 @@ export let BaseConfig = class BaseConfig { providers: { google: { name: 'google', - url: '/google', + url: '/auth/google', authorizationEndpoint: 'https://accounts.google.com/o/oauth2/auth', redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host, scope: ['profile', 'email'], @@ -80,7 +80,7 @@ export let BaseConfig = class BaseConfig { }, facebook: { name: 'facebook', - url: '/facebook', + url: '/auth/facebook', authorizationEndpoint: 'https://www.facebook.com/v2.3/dialog/oauth', redirectUri: window.location.origin + '/' || window.location.protocol + '//' + window.location.host + '/', scope: ['email'], @@ -98,7 +98,7 @@ export let BaseConfig = class BaseConfig { }, linkedin: { name: 'linkedin', - url: '/linkedin', + url: '/auth/linkedin', authorizationEndpoint: 'https://www.linkedin.com/uas/oauth2/authorization', redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host, requiredUrlParams: ['state'], @@ -113,7 +113,7 @@ export let BaseConfig = class BaseConfig { }, github: { name: 'github', - url: '/github', + url: '/auth/github', authorizationEndpoint: 'https://github.com/login/oauth/authorize', redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host, optionalUrlParams: ['scope'], @@ -127,7 +127,7 @@ export let BaseConfig = class BaseConfig { }, yahoo: { name: 'yahoo', - url: '/yahoo', + url: '/auth/yahoo', authorizationEndpoint: 'https://api.login.yahoo.com/oauth2/request_auth', redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host, scope: [], @@ -140,7 +140,7 @@ export let BaseConfig = class BaseConfig { }, twitter: { name: 'twitter', - url: '/twitter', + url: '/auth/twitter', authorizationEndpoint: 'https://api.twitter.com/oauth/authenticate', type: '1.0', popupOptions: { @@ -165,7 +165,7 @@ export let BaseConfig = class BaseConfig { }, instagram: { name: 'instagram', - url: '/instagram', + url: '/auth/instagram', authorizationEndpoint: 'https://api.instagram.com/oauth/authorize', redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host, requiredUrlParams: ['scope'], diff --git a/dist/system/aurelia-authentication.d.ts b/dist/system/aurelia-authentication.d.ts index 7798028..b88c6c1 100644 --- a/dist/system/aurelia-authentication.d.ts +++ b/dist/system/aurelia-authentication.d.ts @@ -12,12 +12,25 @@ declare module 'aurelia-authentication' { import { Redirect } from 'aurelia-router'; + export class authUtils { + static isDefined(value: any): any; + static camelCase(name: any): any; + static parseQueryString(keyValue: any): any; + static isString(value: any): any; + static isObject(value: any): any; + static isArray: any; + static isFunction(value: any): any; + static joinUrl(baseUrl: any, url: any): any; + static isBlankObject(value: any): any; + static isArrayLike(obj: any): any; + static isWindow(obj: any): any; + static extend(dst: any): any; + static merge(dst: any): any; + static forEach(obj: any, iterator: any, context: any): any; + } export class AuthFilterValueConverter { toView(routes: any, isAuthenticated: any): any; } - export { - authUtils - }; export class BaseConfig { configure(incomingConfig: any): any; current: any; diff --git a/dist/system/authUtils.js b/dist/system/authUtils.js index 3ce6fc2..fd49b9b 100644 --- a/dist/system/authUtils.js +++ b/dist/system/authUtils.js @@ -1,7 +1,13 @@ 'use strict'; System.register([], function (_export, _context) { - var _typeof, slice, authUtils; + var _typeof, _class, _temp, slice, authUtils; + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } function setHashKey(obj, h) { if (h) { @@ -49,18 +55,22 @@ System.register([], function (_export, _context) { }; slice = [].slice; - _export('authUtils', authUtils = { - isDefined: function isDefined(value) { + _export('authUtils', authUtils = (_temp = _class = function () { + function authUtils() { + _classCallCheck(this, authUtils); + } + + authUtils.isDefined = function isDefined(value) { return typeof value !== 'undefined'; - }, + }; - camelCase: function camelCase(name) { + authUtils.camelCase = function camelCase(name) { return name.replace(/([\:\-\_]+(.))/g, function (_, separator, letter, offset) { return offset ? letter.toUpperCase() : letter; }); - }, + }; - parseQueryString: function parseQueryString(keyValue) { + authUtils.parseQueryString = function parseQueryString(keyValue) { var obj = {}; var key = void 0; var value = void 0; @@ -73,22 +83,21 @@ System.register([], function (_export, _context) { } }); return obj; - }, + }; - isString: function isString(value) { + authUtils.isString = function isString(value) { return typeof value === 'string'; - }, + }; - isObject: function isObject(value) { + authUtils.isObject = function isObject(value) { return value !== null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object'; - }, - isArray: Array.isArray, + }; - isFunction: function isFunction(value) { + authUtils.isFunction = function isFunction(value) { return typeof value === 'function'; - }, + }; - joinUrl: function joinUrl(baseUrl, url) { + authUtils.joinUrl = function joinUrl(baseUrl, url) { if (/^(?:[a-z]+:)?\/\//i.test(url)) { return url; } @@ -100,25 +109,31 @@ System.register([], function (_export, _context) { }; return normalize(joined); - }, - isBlankObject: function isBlankObject(value) { + }; + + authUtils.isBlankObject = function isBlankObject(value) { return value !== null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && !Object.getPrototypeOf(value); - }, - isArrayLike: function isArrayLike(obj) { + }; + + authUtils.isArrayLike = function isArrayLike(obj) { if (obj === null || authUtils.isWindow(obj)) { return false; } - }, - isWindow: function isWindow(obj) { + }; + + authUtils.isWindow = function isWindow(obj) { return obj && obj.window === obj; - }, - extend: function extend(dst) { + }; + + authUtils.extend = function extend(dst) { return baseExtend(dst, slice.call(arguments, 1), false); - }, - merge: function merge(dst) { + }; + + authUtils.merge = function merge(dst) { return baseExtend(dst, slice.call(arguments, 1), true); - }, - forEach: function (_forEach) { + }; + + authUtils.forEach = function (_forEach) { function forEach(_x, _x2, _x3) { return _forEach.apply(this, arguments); } @@ -168,9 +183,10 @@ System.register([], function (_export, _context) { } } } - }) + }); - }); + return authUtils; + }(), _class.isArray = Array.isArray, _temp)); _export('authUtils', authUtils); } diff --git a/dist/system/baseConfig.js b/dist/system/baseConfig.js index e8caa42..355aceb 100644 --- a/dist/system/baseConfig.js +++ b/dist/system/baseConfig.js @@ -64,15 +64,15 @@ System.register(['./authUtils'], function (_export, _context) { signupRedirect: '#/login', - baseUrl: '/auth', + baseUrl: '', - loginUrl: '/login', + loginUrl: '/auth/login', - signupUrl: '/signup', + signupUrl: '/auth/signup', - profileUrl: '/me', + profileUrl: '/auth/me', - unlinkUrl: '/unlink/', + unlinkUrl: '/auth/unlink/', unlinkMethod: 'get', @@ -99,7 +99,7 @@ System.register(['./authUtils'], function (_export, _context) { providers: { google: { name: 'google', - url: '/google', + url: '/auth/google', authorizationEndpoint: 'https://accounts.google.com/o/oauth2/auth', redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host, scope: ['profile', 'email'], @@ -117,7 +117,7 @@ System.register(['./authUtils'], function (_export, _context) { }, facebook: { name: 'facebook', - url: '/facebook', + url: '/auth/facebook', authorizationEndpoint: 'https://www.facebook.com/v2.3/dialog/oauth', redirectUri: window.location.origin + '/' || window.location.protocol + '//' + window.location.host + '/', scope: ['email'], @@ -135,7 +135,7 @@ System.register(['./authUtils'], function (_export, _context) { }, linkedin: { name: 'linkedin', - url: '/linkedin', + url: '/auth/linkedin', authorizationEndpoint: 'https://www.linkedin.com/uas/oauth2/authorization', redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host, requiredUrlParams: ['state'], @@ -150,7 +150,7 @@ System.register(['./authUtils'], function (_export, _context) { }, github: { name: 'github', - url: '/github', + url: '/auth/github', authorizationEndpoint: 'https://github.com/login/oauth/authorize', redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host, optionalUrlParams: ['scope'], @@ -164,7 +164,7 @@ System.register(['./authUtils'], function (_export, _context) { }, yahoo: { name: 'yahoo', - url: '/yahoo', + url: '/auth/yahoo', authorizationEndpoint: 'https://api.login.yahoo.com/oauth2/request_auth', redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host, scope: [], @@ -177,7 +177,7 @@ System.register(['./authUtils'], function (_export, _context) { }, twitter: { name: 'twitter', - url: '/twitter', + url: '/auth/twitter', authorizationEndpoint: 'https://api.twitter.com/oauth/authenticate', type: '1.0', popupOptions: { @@ -202,7 +202,7 @@ System.register(['./authUtils'], function (_export, _context) { }, instagram: { name: 'instagram', - url: '/instagram', + url: '/auth/instagram', authorizationEndpoint: 'https://api.instagram.com/oauth/authorize', redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host, requiredUrlParams: ['scope'], diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index b754153..6bd50d9 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,7 @@ + +### 2.0.1 (2016-03-29) + + ## 2.0.0 (2016-03-29) diff --git a/package.json b/package.json index 9321f52..d8af174 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-authentication", - "version": "2.0.0", + "version": "2.0.1", "description": "Plugin for social media authentication and local authentication together with other authentication utilities.", "keywords": [ "aurelia",