module JwtClaims::Claim::Sub

Subject @see tools.ietf.org/html/rfc7519#section-4.1.2

Public Instance Methods

reject?(sub, options = {}) click to toggle source

@param sub [String] the principal that is the subject of the JWT @param options [Hash] (key sub:) expected subject to match with claim @return [true, false] whether to reject the claim

# File lib/jwt_claims/claim/sub.rb, line 14
def reject?(sub, options = {})
  expected_subject = options.fetch(:sub, nil)
  !StringOrUri.present_and_equal?(sub, expected_subject)
end