User authentication is performed using OpenID against the Google OpenID Provider endpoint. Any user with a Google Account can be authorized and identified by a UOW server.
uow.getUser() → dojo.Deferred
This method retrieves information about the user logged into the current domain.
The return value is a dojo.Deferred. You should invoke then on the deferred to register a callback function that will receive a object with the following properties:
uow.logout() → undefined
This method removes the authentication cookie for the user currently logged into the current domain. After removing the cookie, the method refreshes the page to ensure no private data remains displayed.
This method returns no value as the page always refreshes after invocation.
uow.triggerLogin() → dojo.Deferred
This method attempts to authenticate the current user via a Google Account. A popup window appears in which Google asks the user to create a new Google Account or sign into an existing account if the user is not currently signed into any Google service. Once signed in, the popup windows asks the user to allow or deny the UOW server access to his or her name, email address, etc. for authentication.
The return value is a dojo.Deferred. You should invoke then on the deferred to register a callback function that will receive a object with the following properties:
var def = uow.getUser();
def.then(function(user) {
var text = dojo.toJson(user);
dojo.byId('auth_ex1log').innerHTML = text;
});