Class: JWT::Claims::Numeric

Inherits:
Object
  • Object
show all
Defined in:
lib/jwt/claims/numeric.rb

Overview

The Numeric class is responsible for validating numeric claims in a JWT token. The numeric claims are: exp, iat and nbf

Instance Method Summary collapse

Instance Method Details

#verify!(context:) ⇒ nil

Verifies the numeric claims in the JWT context.

Parameters:

  • context (Object)

    the context containing the JWT payload.

Returns:

  • (nil)

Raises:

  • (JWT::InvalidClaimError)

    if any numeric claim is invalid.



22
23
24
# File 'lib/jwt/claims/numeric.rb', line 22

def verify!(context:)
  validate_numeric_claims(context.payload)
end