Documentation ¶
Overview ¶
Package user provides a client for App Engine's user authentication service.
Index ¶
- func IsAdmin(c appengine.Context) bool
- func LoginURL(c appengine.Context, dest string) (string, error)
- func LoginURLFederated(c appengine.Context, dest, identity string) (string, error)
- func LogoutURL(c appengine.Context, dest string) (string, error)
- func OAuthConsumerKey(c appengine.Context) (string, error)
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAdmin ¶
IsAdmin returns true if the current user is signed in and is currently registered as an administrator of the application.
func LoginURL ¶
LoginURL returns a URL that, when visited, prompts the user to sign in, then redirects the user to the URL specified by dest.
func LoginURLFederated ¶
LoginURLFederated is like LoginURL but accepts a user's OpenID identifier.
Types ¶
type User ¶
type User struct { Email string AuthDomain string Admin bool // ID is the unique permanent ID of the user. // It is populated if the Email is associated // with a Google account, or empty otherwise. ID string FederatedIdentity string FederatedProvider string }
User represents a user of the application.
func CurrentOAuth ¶
CurrentOAuth returns the user associated with the OAuth consumer making this request. If the OAuth consumer did not make a valid OAuth request, or the scope is non-empty and the current user does not have this scope, this method will return an error.