Class: NoPassword::EmailAuthentication

Inherits:
Model
  • Object
show all
Defined in:
app/models/nopassword/email_authentication.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Model

#initialize

Constructor Details

This class inherits a constructor from NoPassword::Model

Instance Attribute Details

#emailObject

Returns the value of attribute email.



4
5
6
# File 'app/models/nopassword/email_authentication.rb', line 4

def email
  @email
end

Instance Method Details

#destroy!Object



16
17
18
# File 'app/models/nopassword/email_authentication.rb', line 16

def destroy!
  secret.destroy!
end

#verificationObject



9
10
11
12
13
14
# File 'app/models/nopassword/email_authentication.rb', line 9

def verification
  # We don't want the code in the verification, otherwise
  # the user will set it on the subsequent request, which
  # would undermine the whole thing.
  NoPassword::Verification.new(salt: salt, data: email) if valid?
end