Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c2bda8f

Browse files
author
Vincens Mink
committed
Updated README with configUpdater function
Described how to use the config updater function in an Advanced use case section. Have not changed anything, just added.
1 parent 8ef0278 commit c2bda8f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,9 @@ to HTTP 401 response.
4141
* your initial failed request will now be retried and when proper response is finally received,
4242
the `function(response) {do-something-with-response}` will fire,
4343
* your application will continue as nothing had happened.
44+
45+
###Advanced use case:
46+
Same beginning as before but,
47+
* once your application figures out the authentication is OK, call: `authService.loginConfirmed([data], [updateConfigFunc)`,
48+
* 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.
49+

0 commit comments

Comments
 (0)