Created
October 1, 2012 16:25
-
-
Save matzew/3812824 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WRONG authenticator (or even nil) | |
var somePipeline = aerogear.pipeline([ { name: "tasks", settings: { baseURL: "somePROTECTED_URL", authenticator: null}}]); | |
var myPipe = somePipeline.pipes["tasks"]; | |
myPipe.read(); // returns 401 status-code when going against a SERVER that requires auth | |
However, 'myPipe.isAuthenticated()' returns TRUE as the default... - which is wrong when no (or 'wrong') authenticator has been attached. | |
// ==== SRC of isAuthenticated ==== | |
isAuthenticated: function() { | |
return this.authenticator ? this.authenticator.isAuthenticated() : true; | |
}, | |
// ===== END ================== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment