Swiftpack.co - Package - vapor/auth


Stars: 39
Help us keep the lights on


2.0.1 - Aug 14, 2018


  • Moved HTTP bearer and basic auth helpers to vapor/http package. (#54)
  • req.unauthenticate(...) now correctly destroys session. (#52)

2.0.0 - Aug 9, 2018

Auth 2.0 is here 🎉 👤 Authentication and Authorization framework for Fluent (Authorization coming soon).

The Auth API Template has also been updated:

vapor new Hello --template=auth-template

Docs: https://docs.vapor.codes/3.0/auth/getting-started/

API Docs: https://api.vapor.codes/auth/latest/Authentication

2.0.0-rc.5 - Jun 15, 2018


  • Updated to latest Fluent RCs.

2.0.0-rc.4.1 - May 15, 2018


  • Token authentication middleware no longer throws if not authenticated. (#42)
  • Fixed an issue where UserIDType typealias was required. (#41)

2.0.0-rc.4 - May 9, 2018


  • Added GuardAuthenticationMiddleware. Authentication middlewares will no longer fail if they cannot authenticate a user. This allows the package's middlewares to be composed together to do multiple authentication types on a single route.

Use Authenticatable.guardAuthMiddleware() to restore this error throwing behavior.

let protected = router.grouped(
protected.get("test") { req in
    return "This route is protected"

note: calling requireAuthenticated will always throw an error if User is not authed, regardless of the presence of GuardAuthenticationMiddleware.


  • Authenticatable protocols have had Model requirements removed. Free conformance still applies where Model conformance exists.
  • Crypto module is now being exported by default.

Milestone: 2.0.0-rc.4