Exception: NoPassword::UnauthenticatedError

Inherits:
Error
  • Object
show all
Defined in:
lib/nopassword.rb

Overview

Raised when authentication is required but the user is not authenticated. Carries context (email, return_url) that can be used to redirect to auth.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(email: nil, return_url: nil, message: "Authentication required") ⇒ UnauthenticatedError

Returns a new instance of UnauthenticatedError.



25
26
27
28
29
# File 'lib/nopassword.rb', line 25

def initialize(email: nil, return_url: nil, message: "Authentication required")
  @email = email
  @return_url = return_url
  super(message)
end

Instance Attribute Details

#emailObject (readonly)

Returns the value of attribute email.



23
24
25
# File 'lib/nopassword.rb', line 23

def email
  @email
end

#return_urlObject (readonly)

Returns the value of attribute return_url.



23
24
25
# File 'lib/nopassword.rb', line 23

def return_url
  @return_url
end