Merge branch 'v1.2-next' of git.oauth3.org:OAuth3/oauth3.js into v1.2-next

This commit is contained in:
AJ ONeal 2017-11-29 05:13:53 +00:00
commit f4b3dbd495
3 changed files with 6 additions and 6 deletions

View File

@ -169,7 +169,7 @@
}
, scope: {
parse: function (scope) {
return (scope||'').split(/[+, ]+/g);
return (scope||'').toString().split(/[+, ]+/g);
}
, stringify: function (scope) {
if (Array.isArray(scope)) {

View File

@ -371,7 +371,7 @@ OAUTH3.authn.resourceOwnerPassword = function (directive, opts) {
OAUTH3.authz = {};
OAUTH3.authz.scopes = function (providerUri, session, clientParams) {
var clientUri = OAUTH3.uri.normalize(clientParams.client_uri || OAUTH3._browser.window.document.referrer);
var scope = clientParams.scope || [ 'authn@oauth3.org' ];
var scope = clientParams.scope || 'authn@oauth3.org';
if ('authn@oauth3.org' === scope.toString()) {
// implicit ppid grant is automatic
console.warn('[security] fix scope checking on backend so that we can do automatic grants');

View File

@ -27,10 +27,10 @@
OAUTH3.authz.scopes = function () {
return OAUTH3.PromiseA.resolve({
pending: ['oauth3_authn'] // not yet accepted
, granted: [] // all granted, ever
, requested: ['oauth3_authn'] // all requested, now
, accepted: [] // granted (ever) and requested (now)
pending: [ 'authn@oauth3.org' ] // not yet accepted
, granted: [] // all granted, ever
, requested: [ 'authn@oauth3.org' ] // all requested, now
, accepted: [] // granted (ever) and requested (now)
});
};
OAUTH3.authz.grants = function (providerUri, opts) {