vapor-community / ferno

Vapor Firebase Realtime database provider
MIT License
70 stars 11 forks source link

Doesn't conform to JWT 3.0.0 release #3

Closed martinlasek closed 5 years ago

martinlasek commented 6 years ago

If your project depends on JWT 3.0.0 and you also try using this (Ferno) package with it's dependency of JWT being 3.0.0-rc.2.1.1, you'll end up having the highest thus JWT 3.0.0 fetched into your project.

This leads to Ferno not being able to compile because Payload no longer conforms to JWTPayload.

Currently it implements

struct Payload: JWTPayload {
  ...

  func verify() throws {
    try exp.verify()
  }
}

I haven't worked enough with JWT to create a mergable PR so I am not sure if this would even be a temporary fix for the current package implementation:

struct Payload: JWTPayload {
  ...

  func verify(using signer: JWTSigner) throws {
    try exp.verifyNotExpired()  // .verify() is deprecated
  }
}

But it conforms and compiles, obviously the signer passed into the function is never used, but this sounds like it does what it is expected to do: verify.

AAAstorga commented 6 years ago

Thank you! Will update the library soon! 👍

mhs2342 commented 5 years ago

Doesn't seem like a fix has been released

simonmitchell commented 5 years ago

@AAAstorga any chance of getting this updated? I'm happy to submit a PR from our fork!

simonmitchell commented 5 years ago

Have submitted the PR here https://github.com/vapor-community/ferno/pull/4 with @MartinLasek's suggested change!

vzsg commented 5 years ago

I haven't tried, but as painful this whole ordeal is, I merged and tagged 0.4.0 with it, so at least there's some movement. Please check if it works.

simonmitchell commented 5 years ago

Scared myself a bit there that I'd somehow broken things... turned out I just had to delete the .build folder to resolve some issues with SPM pulling the latest version! It's all working great now, thanks for merging 😊

vzsg commented 5 years ago

Thanks for the update :)