Class: Verikloak::Audience::Forbidden

Inherits:
Error
  • Object
show all
Defined in:
lib/verikloak/audience/errors.rb

Overview

Raised when verified claims do not satisfy the configured profile. Typically emitted when the required audience list is empty or mismatches the token audiences.

Instance Method Summary collapse

Constructor Details

#initialize(msg = 'insufficient audience') ⇒ Forbidden

Build a forbidden error with a customizable message while preserving the standard machine-friendly code and HTTP status.

Parameters:

  • msg (String) (defaults to: 'insufficient audience')

    alternate human-readable explanation



31
32
33
# File 'lib/verikloak/audience/errors.rb', line 31

def initialize(msg = 'insufficient audience')
  super(msg, code: 'insufficient_audience', http_status: 403)
end