Class google.accounts.user
Object
|
+--google.accounts.user
- class
google.accounts.user
Class representing state of an authenticated user session.
Defined in gdata.js
Method Summary |
Boolean
|
checkLogin(<String> scope)
Check if a login token is present for a specified scope, without
making RPC to check if it is actually valid.
|
Object
|
getInfo(<Function> callback)
Returns information about the login associated with the user, if any,
such as target domain and scopes.
|
Boolean
|
login(<String> opt_scope)
Request a login for any requested scopes, validate any local token,
and redirect if necessary.
|
Object
|
logout(opt_callback)
Logout the user.
|
google.accounts.user
google.accounts.user()
checkLogin
Boolean checkLogin(<String> scope)
Check if a login token is present for a specified scope, without
making RPC to check if it is actually valid. The app must be able
to handle an authorization exception when the token is used,
because we don't guarantee the returned token is valid.
Parameters:
scope
- A scope to check for a token.
Returns:
Returns true if the user has a token for the specified scope.
getInfo
Object getInfo(<Function> callback)
Returns information about the login associated with the user, if any,
such as target domain and scopes.
Parameters:
callback
- A function to pass information about the user.
login
Boolean login(<String> opt_scope)
Request a login for any requested scopes, validate any local token,
and redirect if necessary.
This method always redirects if false is returned. The redirect
occurs on a timer to allow the script to cleanup and other scripts
on the page to request additional scopes.
Parameters:
opt_scope
- Requested scope.
Returns:
Returns true if valid login for all scopes, false if redirect will happen, null if no scopes are set.
logout
Object logout(opt_callback)
Parameters:
callback
- A function called after logout completes.
Returns:
false if user already logged out.
Documentation generated by
JSDoc on Fri Sep 14 16:32:36 2007