Skip to content

Releases: skelpo/JWTMiddleware

v0.5.0

02 May 20:07
e113d94
Compare
Choose a tag to compare

Non-Generic JWT Verification

  • Renamed JWTVerificationMiddleware<Payload> to JWTStorageMiddleware<Payload>
  • Created JWTVerificationMiddleware which only verifies the access token. No storing.
  • Fixed typo in name of JWTAuthenticatableMiddleware (@jimmya)

v0.4.1

26 Apr 20:49
e4e2b53
Compare
Choose a tag to compare

Only Work with Existing Data

You should only decode a request's body if it exists, so we make sure there is one before we do by checking whether the HTTP method allows for it. Only if the answer is 'yes' do we decode.

v0.4.0

26 Apr 20:48
5df5571
Compare
Choose a tag to compare

Manipulating the Future

Decoding optional value from a request body only works when decoding asynchronously, so JWTAuthenticatable.authBody(from:) now returns a Future<AuthBody?>.

v0.3.1

26 Apr 20:46
be72694
Compare
Choose a tag to compare

Let No Some User Pass

When you try to get the password value from a request using the passwrod key, it just don't work. Typo's fixed now!

v0.3.0

26 Apr 20:45
69c1e7e
Compare
Choose a tag to compare

Request: The Final Message

There are 3 new extension methods added to Vapor's Request object:

  • accessToken()throws -> String
  • payload<Payload: Decodable>(as payloadType: Payload.Type = Payload.self)throws -> Payload
  • payloadData<Payload, Object>(storedAs stored: Payload.Type, convertedTo objectType: Object.Type = Object.self)throws -> Object where Payload: Encodable, Object: Decodable

v0.2.2

20 Apr 16:26
dd47e20
Compare
Choose a tag to compare

README All the Docs

The README should contain the the necessary documentation now.

When you add the JWTMiddleware library to a target, you can now import both the JWTMiddleware and JWTAuthenticatable modules. The JWTMiddleware target also exports the JWTAuthenticatable module.

v0.2.1

19 Apr 19:16
Compare
Choose a tag to compare

Instructions Below

Find out about it in the README.