mirror of https://github.com/vapor/docs.git
Merge pull request #44 from siemensikkema/master
Minor improvements to auth documentation
This commit is contained in:
commit
ef5ec4fc25
|
|
@ -72,7 +72,7 @@ Once you've added the `AuthMiddleware` to the available middleware dictionary, m
|
|||
|
||||
### Sharing Cache
|
||||
|
||||
If you'd like the `Droplet` and the `AuthMiddleware` to share the same `CacheProtocol`, initialize it earlier and pass it to both.
|
||||
If you'd like the `Droplet` and the `AuthMiddleware` to share the same `CacheProtocol`, pass the same instance to both.
|
||||
|
||||
```
|
||||
import VaporRedis
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ Adding the `Identifier` case for `Credentials` is easy, just look up the user by
|
|||
|
||||
```swift
|
||||
let id = Identifier(id: 42)
|
||||
try req.auth.log(id)
|
||||
try req.auth.login(id)
|
||||
```
|
||||
|
||||
Now you can manually log users in with just their identifiers.
|
||||
|
|
|
|||
Loading…
Reference in New Issue