protected function addRoutes()
    {
        // Define a "not found" route
        $this->router->add('/', [$this, 'unknownEndpoint']);

        // Only add these routes if we're using authorization
        if ($this->configuration->getUseAuthorization()) {
            // Token route for requesting tokens
            $this->router->add('/token', [$this, 'token']);

            if ($this->configuration->getAuthorizationMode() >= 2) {
                // Token route for authorizing a client
                $this->router->add('/authorize', [$this, 'authorize']);
            }
        }

        return $this;
    }