kylef / JSONWebToken.swift

Swift implementation of JSON Web Token (JWT).
http://jwt.io
BSD 2-Clause "Simplified" License
762 stars 226 forks source link

Removed invalidIssuedAt #55

Closed realmike33 closed 7 years ago

realmike33 commented 7 years ago

major problem for production severs

kylef commented 7 years ago

I'd like to go down the route with a leeway instead of completely removing this validation.

https://github.com/kylef/JSONWebToken.swift/issues/54#issuecomment-327768920

If the leeway doesn't work for you, you can disable validation and manually call the validate*() functions on the returned claim set that you would like to use, for example:

let claimset = decode(..., validate: false)
claimset.validateIssuer("x")
claimset.validateExpiary()