Class: NoPassword::Email::Authentication

Inherits:
Session::Authentication show all
Defined in:
lib/nopassword/email/authentication.rb

Overview

Email-specific authentication that adds email validation and normalization.

Instance Method Summary collapse

Methods inherited from Session::Authentication

#challenge, #delete, #initialize, #persisted?, #save, #save!, #save_without_validation, update, #verification

Constructor Details

This class inherits a constructor from NoPassword::Session::Authentication

Instance Method Details

#email=(value) ⇒ Object

Normalize email on assignment



10
11
12
# File 'lib/nopassword/email/authentication.rb', line 10

def email=(value)
  super(value&.strip&.downcase)
end

#identifierObject

Email is the identifier for this authentication type



15
16
17
# File 'lib/nopassword/email/authentication.rb', line 15

def identifier
  email
end