Releases: skelpo/JWTMiddleware
v0.5.0
v0.4.1
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
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
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
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
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.