Bump to 1.1.0+1

This commit is contained in:
Tobe O 2017-12-21 01:32:16 -05:00
parent afaa2c0794
commit 4e2a4606d1
3 changed files with 14 additions and 4 deletions

2
CHANGELOG.md Normal file
View file

@ -0,0 +1,2 @@
# 1.1.0+1
* Modified `LocalAuthStrategy`'s handling of `Basic` authentication.

View file

@ -57,6 +57,14 @@ class LocalAuthStrategy extends AuthStrategy {
await verifier(usrPassMatch.group(1), usrPassMatch.group(2));
} else
throw new AngelHttpException.badRequest(errors: [invalidMessage]);
if (verificationResult == false || verificationResult == null) {
res
..statusCode = 401
..headers[HttpHeaders.WWW_AUTHENTICATE] = 'Basic realm="$realm"'
..end();
return false;
}
}
}
@ -81,9 +89,9 @@ class LocalAuthStrategy extends AuthStrategy {
..statusCode = 401
..headers[HttpHeaders.WWW_AUTHENTICATE] = 'Basic realm="$realm"'
..end();
return false;
} else
return false;
}
return false;
} else if (verificationResult != null && verificationResult != false) {
return verificationResult;
} else {

View file

@ -1,6 +1,6 @@
name: angel_auth
description: A complete authentication plugin for Angel.
version: 1.1.0
version: 1.1.0+1
author: Tobe O <thosakwe@gmail.com>
homepage: https://github.com/angel-dart/angel_auth
environment: