Instance Method
require(_:)
Look up an instance of the supplied type, treating it as an error if there is no such instance.
@discardableResult func require<A>(_ type: A.Type = A.self) throws(Abort) -> A where A : Authenticatable
Parameters
typeThe authenticatable type to look up
Return Value
An instance of the requested type, if one exists
Discussion
Throws
Abort(.unauthorized) if no instance of the requested type is available