Content type slug in route, how? I have a content type "Company", each company will have a login page that show the logo of the company and a login form via Restful.

I have created a module that define a route:

company_md.login:
  path: '/{company_slug}/login'
  defaults:
    _controller: '\Drupal\company_md\Controller\DefaultController::login'
    _title: 'Company XX Login'


When I go to that URL it give me Not Found 404, whats wrong in my routing?

EDIT 1

This how the path look:

http://companies.local/node-13-company/login4


EDIT 2

My routing file:

testd8.name:
  path: '/node/{node1}/login'
  defaults:
    _controller: '\Drupal\testd8\Controller\DefaultController::login'
  requirements:
    _access: 'TRUE'
  options:
    parameters:
      node1:
        type: entity:node
Do you have an entity type or a content type? If you create one in the UI, it's a content Type. Then it really is a node, so what you want to use is {node}. Then upcasting will work (assuming you have NodeInterface $node in your controller).

That said, access denied is, as Ivan Jaros said, the missing access definitions. The default access definition is that that access is denied. access: 'TRUE' will give anyone access.

What you likely want to use is _entity_access: node:view then the standard node access system is invoked and the user has access if he can view that node.