Middleware for authorizing access to protected resources via OAuth2Server