Method: Sandal::Claims#validate_iss

Defined in:
lib/sandal/claims.rb

#validate_iss(valid_iss) ⇒ void

This method returns an undefined value.

Validates the issuer claim.

Parameters:

  • valid_iss (Array)

    The valid issuers.

Raises:

[View source]

55
56
57
58
59
60
61
# File 'lib/sandal/claims.rb', line 55

def validate_iss(valid_iss)
  return unless valid_iss && valid_iss.length > 0

  unless valid_iss.include?(self["iss"])
    raise Sandal::ClaimError, "The issuer is invalid."
  end
end