asOptional abstract method

IAuthMiddleware asOptional()

Gives the same middleware (with the same guards) that lets guests through. A good login sets req.auth. No login, or a bad token, goes on with req.auth null.

Implementation

IAuthMiddleware asOptional();