Skip to content

Releases: skelpo/JWTMiddleware

1.0.0

20 Oct 18:17
1297f41
Compare
Choose a tag to compare

Update dependencies for Vapor 4.

Release Candidate 1

16 Mar 17:02
2acd0e1
Compare
Choose a tag to compare
Release Candidate 1 Pre-release
Pre-release
  • Fully ready for Vapor 4
  • Has tests now
  • Switching to the Vapor style of semver
  • CI enabled
  • Repo cleaned up

v0.10.0 Dependencies Updated

16 Jul 12:11
Compare
Choose a tag to compare
dependency update

v0.9.0

07 Dec 14:49
466838e
Compare
Choose a tag to compare

Type Less, Type Less

Removed the Status generic type from PermissionsMiddleware because we can get that type information from the Payload generic type.

We also create a static String.payloadKey value so the key where the JWT payload is stored is type safe.

In the JWTVerificationMiddleware, if an Authorization header is not found, status code 402 (Unauthorized) is returned instead of 400 (Bad Request).

v0.8.2

16 Oct 08:08
696b3ea
Compare
Choose a tag to compare

Adjusting usernameKey to now be a WritableKeyPath

Thanks @Joebayld

v0.8.1

26 Jul 13:23
7f176b3
Compare
Choose a tag to compare

Back to Where it Came From

In the JWTStorageMiddleware, we where pulling the payload from the request's private container, saving it back again, and continuing. Yeah, not point in doing that!

So now we get the JWT from the auth header, verify it, and store the payload in the request's private container. A much better idea.

v0.8.0

21 Jun 11:39
3f9493e
Compare
Choose a tag to compare

The Middleware Became Agnostic

RouteRestrictionMiddleware was deemed to restrictive and relied to heavily on the parent route path. It has been replaced with PermissionsMiddleware and any route registered with the middleware is protected by it, making it agnostic to the route path it is on.

v0.7.0

17 May 22:22
7530c79
Compare
Choose a tag to compare

This Route is Rather Restricting

And it should be, considering admins should be the only ones supposed to access the data. And you can add this functionality yourself, with RouteRestrictionMiddeware:

route.group(RouteRestrictionMiddleware(
    restrictions: [
        RouteRestriction(.DELETE, at: "users", User.parameter, allowed: [.admin, .moderator]),
	...
    ],
    parameters: [User.routingSlug: User.resolveParameter]
))

v0.6.1

09 May 16:54
0f51326
Compare
Choose a tag to compare

If They Break it, You Must Unbreak it.

The Auth package's Authenticatable protocol no longer requires conformance to Model, so we add it ourselves to JWTAuthenticatable: #9

v0.6.0

07 May 20:32
e88d78b
Compare
Choose a tag to compare

Vapor Things: Season 3

Lets get away from the strangness of betas for a while. We now use the official Vapor 3.0 release.