Module: Authentication
- Defined in:
- app/models/authentication.rb
Class Method Summary collapse
- .authenticate(username, password) ⇒ Object
- .password ⇒ Object
- .required? ⇒ Boolean
- .username ⇒ Object
Class Method Details
.authenticate(username, password) ⇒ Object
15 16 17 |
# File 'app/models/authentication.rb', line 15 def authenticate(username, password) self.username == username && self.password == password end |
.password ⇒ Object
11 12 13 |
# File 'app/models/authentication.rb', line 11 def password ENV['AUTH_PASSWORD'] end |
.required? ⇒ Boolean
3 4 5 |
# File 'app/models/authentication.rb', line 3 def required? Rails.env.production? end |
.username ⇒ Object
7 8 9 |
# File 'app/models/authentication.rb', line 7 def username ENV['AUTH_USERNAME'] end |