You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-3Lines changed: 27 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,31 @@ the `function(response) {do-something-with-response}` will fire,
47
47
* your application will continue as nothing had happened.
48
48
49
49
###Advanced use case:
50
-
Same beginning as before but,
51
-
* once your application figures out the authentication is OK, call: `authService.loginConfirmed([data], [updateConfigFunc])`,
52
-
* your initial failed request will now be retried but you can supply additional data to observers who are listening for `event:auth-loginConfirmed`, and all your queued http requests will be recalculated by your `updateConfigFunc(httpConfig)` function. This is very usefull if you need to update the headers with new credentials and/or tokens from your successful login.
50
+
51
+
####Sending data to listeners:
52
+
You can supply additional data to observers accross your application who are listening for `event:auth-loginConfirmed`:
Successful login means that the previous request are ready to be fired again, however now that login has occured certain aspects of the previous requests might need to be modified on the fly. This is particularly important in a token based authentication scheme where an authorization token should be added to the header.
63
+
64
+
The `loginConfirmed` method supports the injection of an Updater function that will apply changes to the http config object.
0 commit comments