jjzjj

AuthMiddleware

全部标签

swift - 如何为多个实体使用 AuthMiddleware?

我尝试为两个实体使用VaporAuthMiddleware:Customer和Merchanthttps://vapor.github.io/documentation/auth/request.htmlletauth=AuthMiddleware(user:Customer.self){valueinreturnCookie(name:"vapor-auth",value:value,expires:Date().addingTimeInterval(60*60*5),secure:true,httpOnly:true)}但正如我所见,第一个添加的中间件(客户)被第二个(商家)替换,