12 lines
310 B
JavaScript
12 lines
310 B
JavaScript
/* Watch login and logout events */
|
|
|
|
navigator.id.watch({
|
|
loggedInUser: null,
|
|
onlogin: function(assertion) {
|
|
// POST assertion
|
|
$('form.BrowserID').append('<input type="hidden" name="browserIdAssertion" value="' + assertion + '" />').submit();
|
|
},
|
|
onlogout: function() {
|
|
// Do nothing
|
|
}
|
|
}); |