Skip to content

Leeway or exp_leeway #215

@allavena

Description

@allavena

Documentation mentions the parameter :exp_leeway. However, in practice, :leeway seems to be what works.

I have an expired token.

JWT.decode token2, key, true, { :exp_leeway => 1000, :algorithm => 'HS256' } # JWT::ExpiredSignature: Signature has expired

JWT.decode token2, key, true, { :leeway => 1000, :algorithm => 'HS256' } # decodes fine. 

Content of my token: [{"exp"=>1501054718, "iat"=>1501053518, "nbf"=>1501053513, "account_id"=>1193 }]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions