Swiftpack.co - Package - vapor/auth

Auth

Documentation Team Chat MIT License Continuous Integration Swift 4.1

Note: the Auth package is built-in to Vapor 4. This package is for version 3, and is not necessary in future versions.

Github

link
Stars: 56

Releases

Auth 2.0.4 - 2019-06-11 23:39:57

Fixed:

  • Session authentication middleware now correctly short-circuits if authentication already succeeded (#68, #69)

Auth 2.0.3 - 2019-02-18 20:29:43

Fix issue where people taking the latest release would get compile errors from pulling in incorrect Vapor version

Auth 2.0.2 - 2019-02-12 19:27:33

Fixed:

  • Fixed an issue where a new, empty session would be created after unauthenticating a user and destroying the session at the same time. (#60, #59)

Auth 2.0.1 - 2018-08-14 18:27:11

Fixed:

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

Auth 2.0.0 - 2018-08-09 19:53:30

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

Auth 2.0.0 RC 5 - 2018-06-15 17:32:01

Fixed:

  • Updated to latest Fluent RCs.

Auth 2.0.0 RC 4.1 - 2018-05-15 22:51:48

Fixed:

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

Auth 2.0.0 RC 4 - 2018-05-09 02:30:26

New:

  • 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(
    User.basicAuthMiddleware(...),
    User.guardAuthMiddleware()
)
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.

Fixed:

  • 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

Auth 2.0.0 RC 3.1 - 2018-04-18 20:18:59

New:

  • Added req.unauthenticate(...) method to unauth the user for the lifetime of the request.

Fixed:

  • Using http dependency now.

Auth 2.0.0 RC 3 - 2018-03-21 22:49:23

New:

  • Vapor is now running on Swift NIO!

Fixed:

  • Fixed some issues with session persistence using MemorySessions.

Milestone

Auth 2.0.0 RC 2 - 2018-03-06 08:04:18

PRs:

  • #25 - UserIDKey typealias
  • #26 - add ability to log out and tidy up database connections

Breaking changes:

  • SessionAuthenticatable is now required to enable session authentication for Users with cookies

Auth 2.0.0 RC 1 - 2018-02-26 20:23:48

Auth 2.0.0 Beta 3 - 2018-02-20 22:31:05

New:

  • Update to latest Fluent beta.
  • Loosen ReferenceWritableKeyPath requirements to WritableKeyPath

Auth 2.0.0 Beta 2.2 - 2018-02-15 16:56:48

Fixed:

  • Updates dependency maximum to latest betas.

Auth 2.0.0 Beta 2.1 - 2018-02-15 02:41:31

Auth 2.0.0 Beta 2 - 2018-02-13 02:32:37

Fixed:

  • Updated to Vapor Beta 2

Auth 2.0.0 Beta 1 - 2018-02-12 17:20:20

Auth 1.2.1 - 2017-09-19 20:53:29

Fixed:

  • Fixed basic auth separator parsing.

Milestone

Auth 1.2.0 - 2017-09-13 20:04:31

New:

  • Swift 4 support

Milestone

Auth 1.1.0 - 2017-07-20 18:36:15

New:

  • Add AuthorizationHeader initializers.

Milestone

1.0.0 - 2017-05-18 18:23:02

Authentication and Authorization layer for Fluent.

1.0.0 Beta 2 - 2017-05-05 15:20:11

New:

  • PR #6

The signature for verifying passwords in the PasswordVerifier has been changed to make it nicer to call and to fit in with real implementations.

When verifying your password it now looks like:

let passwordVerified = passwordVerifier.verify(password: password, matches: hash)

They verify function now takes Bytes as the default argument but there is an extension for anything conforming to BytesConvertible.

Auth 1.0 Beta 1 - 2017-04-07 09:01:31

New:

  • Updated readme + CI
  • Use latest Fluent

Auth 0.4 - 2017-03-29 18:43:27

New:

  • Use Beta packages

Auth 0.3.2 - 2017-03-23 15:41:57

Auth 0.3.1 - 2017-03-23 15:39:33

Auth 0.3 - 2017-03-23 14:20:36

Auth 0.2.1 - 2017-03-23 09:49:05

New:

  • Add an add(permission: ...) convenience
  • Readme

Auth 0.2 - 2017-03-23 09:48:42

Auth 0.1 - 2017-02-16 10:14:36

Simplified authentication and authorization layer on top of Fluent.