Class: Sinatra::AuthHelper::LazyCredentials

Inherits:
Object
  • Object
show all
Defined in:
lib/deltacloud/helpers/auth_helper.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ LazyCredentials

Returns a new instance of LazyCredentials.



23
24
25
26
# File 'lib/deltacloud/helpers/auth_helper.rb', line 23

def initialize(app)
  @app = app
  @provided = false
end

Instance Method Details

#passwordObject



33
34
35
36
# File 'lib/deltacloud/helpers/auth_helper.rb', line 33

def password
  credentials!
  @password
end

#provided?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/deltacloud/helpers/auth_helper.rb', line 38

def provided?
  @provided
end

#userObject



28
29
30
31
# File 'lib/deltacloud/helpers/auth_helper.rb', line 28

def user
  credentials!
  @user
end