The middleware checks for the presents of a 'Token' header and if the provided token is valid. It adds a authorization layer with some basic configuration options.