Module: Sinatra::Auth::Gmail::Helpers

Defined in:
lib/sinatra/auth/gmail.rb

Instance Method Summary collapse

Instance Method Details

#authenticate!(*args) ⇒ Object



21
22
23
# File 'lib/sinatra/auth/gmail.rb', line 21

def authenticate!(*args)
  warden.authenticate!(*args)
end

#authenticated?(*args) ⇒ Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/sinatra/auth/gmail.rb', line 25

def authenticated?(*args)
  warden.authenticated?(*args)
end

#authorize!Object



29
30
31
32
# File 'lib/sinatra/auth/gmail.rb', line 29

def authorize!
  puts "authorize! is depricated. Use authenticate! instead"
  warden.authenticate!
end

#authorized?Boolean

Returns:

  • (Boolean)


16
17
18
19
# File 'lib/sinatra/auth/gmail.rb', line 16

def authorized?
  puts "authorized? depricated.  Use authenticate! instead"
  authenticate!
end

#gmail_userObject



38
39
40
41
# File 'lib/sinatra/auth/gmail.rb', line 38

def gmail_user
  puts "gmail_user is depricated.  Use google_user instead"
  google_user
end

#google_userObject



43
44
45
# File 'lib/sinatra/auth/gmail.rb', line 43

def google_user
  warden.user
end

#logout!Object



34
35
36
# File 'lib/sinatra/auth/gmail.rb', line 34

def logout!
  warden.logout
end

#wardenObject



12
13
14
# File 'lib/sinatra/auth/gmail.rb', line 12

def warden
  env['warden']
end