vapor / auth

👤 Authentication and Authorization framework for Fluent.
53 stars 34 forks source link

TokenAuthenticationMiddleware still throws an Abort (is not optional) #40

Closed andrewtheis closed 6 years ago

andrewtheis commented 6 years ago

In 2.0.0-RC.4, work was done to allow multiple authentication middlewares to exist for a route optionally. However, for TokenAuthenticationMiddleware the following line still throws an Abort:

https://github.com/vapor/auth/blob/c8594a4026924483d3906e7cebf5084ae83efcbf/Sources/Authentication/Token/TokenAuthenticationMiddleware.swift#L17

This should be try? so TokenAuthenticationMiddleware works optionally as intended.