Exception: Rhino::AuthRejected

Inherits:
StandardError
  • Object
show all
Defined in:
lib/rhino/auth_rejected.rb

Overview

Raised by a lifecycle hook (or membership enforcement) to reject an auth action. Carries an HTTP status (default 403) and a message. For token-issuing actions (login/register) the controller revokes the just-issued token before returning the status.

See GROUP_AUTH_DESIGN.md ยง7.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = "Forbidden", status: 403) ⇒ AuthRejected

Returns a new instance of AuthRejected.



13
14
15
16
# File 'lib/rhino/auth_rejected.rb', line 13

def initialize(message = "Forbidden", status: 403)
  @status = status
  super(message)
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



11
12
13
# File 'lib/rhino/auth_rejected.rb', line 11

def status
  @status
end