Class: AppEngine::Users::User

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Class Method Details

.java_newObject

: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_domainObject



111
112
# File 'lib/appengine-apis/users.rb', line 111

def auth_domain
end

#emailObject



119
120
# File 'lib/appengine-apis/users.rb', line 119

def email
end

#nicknameObject

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_idObject

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