mirror of https://github.com/vapor/docs.git
parent
625130615f
commit
ffe4d8d3e0
|
|
@ -6,8 +6,8 @@ currentMenu: LoginRedirectMiddleware
|
|||
|
||||
`LoginRedirectMiddleware` is a Middleware to be used when you what to create an automatic redirection from any routes when the user is not authenticated.
|
||||
|
||||
## Examples
|
||||
In your main.swift file
|
||||
## Example
|
||||
In your main.swift file:
|
||||
|
||||
```swift
|
||||
drop.grouped(LoginRedirectMiddleware(loginRoute: "/login")).group("admin") { routeAdmin in
|
||||
|
|
|
|||
Loading…
Reference in New Issue