Class: AppEngine::Users::User
- Inherits:
-
Object
- Object
- AppEngine::Users::User
- Defined in:
- lib/appengine-apis/users.rb
Overview
User represents a specific user, represented by the combination of an email address and a specific Google Apps domain (which we call an auth_domain). For normal Google login, authDomain will be set to “gmail.com”.
Class Method Summary collapse
-
.java_new ⇒ Object
:nodoc:.
-
.new(email, auth_domain = nil) ⇒ Object
Creates a new User.
Instance Method Summary collapse
- #auth_domain ⇒ Object
- #email ⇒ Object
-
#nickname ⇒ Object
Return this user’s nickname.
-
#user_id ⇒ Object
Returns an opaque string that uniquely identifies the user represented by this User object.
Class Method Details
.java_new ⇒ Object
:nodoc:
82 |
# File 'lib/appengine-apis/users.rb', line 82 alias java_new new |
.new(email, auth_domain = nil) ⇒ Object
Creates a new User.
Args:
-
email: a non-nil email address.
-
auth_domain: an optinoal domain name into which this user has authenticated, or “gmail.com” for normal Google authentication.
90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/appengine-apis/users.rb', line 90 def new(email, auth_domain=nil) unless auth_domain env = AppEngine::ApiProxy.current_environment auth_domain = if env env.getAuthDomain else 'gmail.com' end end java_new(email, auth_domain) end |
Instance Method Details
#auth_domain ⇒ Object
111 112 |
# File 'lib/appengine-apis/users.rb', line 111 def auth_domain end |
#email ⇒ Object
119 120 |
# File 'lib/appengine-apis/users.rb', line 119 def email end |
#nickname ⇒ Object
Return this user’s nickname. The nickname will be a unique, human readable identifier for this user with respect to this application. It will be an email address for some users, but not all.
108 109 |
# File 'lib/appengine-apis/users.rb', line 108 def nickname end |
#user_id ⇒ Object
Returns an opaque string that uniquely identifies the user represented by this User object.
116 117 |
# File 'lib/appengine-apis/users.rb', line 116 def user_id end |