Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Merge pull request #74 from RWOverdijk/hotfix/release
Browse files Browse the repository at this point in the history
Hotfix/release
  • Loading branch information
doktordirk committed Mar 29, 2016
2 parents 6fa3a36 + 31c098d commit d7d9ee1
Show file tree
Hide file tree
Showing 14 changed files with 288 additions and 184 deletions.
19 changes: 16 additions & 3 deletions dist/amd/aurelia-authentication.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
78 changes: 47 additions & 31 deletions dist/amd/authUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand All @@ -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;
}
Expand All @@ -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);
}
Expand Down Expand Up @@ -168,9 +185,8 @@ define(['exports'], function (exports) {
}
}
}
})

};
});

exports.authUtils = authUtils;
return authUtils;
}(), _class.isArray = Array.isArray, _temp);
});
24 changes: 12 additions & 12 deletions dist/amd/baseConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',

Expand All @@ -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'],
Expand All @@ -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'],
Expand All @@ -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'],
Expand All @@ -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'],
Expand All @@ -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: [],
Expand All @@ -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: {
Expand All @@ -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'],
Expand Down
19 changes: 16 additions & 3 deletions dist/commonjs/aurelia-authentication.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading

0 comments on commit d7d9ee1

Please sign in to comment.