Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

Commit

Permalink
should not enforce an optional field
Browse files Browse the repository at this point in the history
  • Loading branch information
EverettQuebral committed Dec 18, 2013
1 parent 97dddfd commit bc571d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/jwt.coffee
Expand Up @@ -115,8 +115,10 @@ module.exports.encode = (claim, key, algorithm = "HS256", header_ext = {}) ->
class JwtRequest

constructor: (@header, @claim, @segments) ->
###
throw new Error "Unable to read `typ` form header or it doesn't match the expected 'JWT' value " unless @header.typ == 'JWT'

###

verify: (key) ->
_alg = @header?.alg
_alg = "none" unless _alg
Expand Down

0 comments on commit bc571d9

Please sign in to comment.