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;
    }
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;
    }
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 ; }
Adds default routes for the API regarding tokens.
These routes can be overridden in the child API class.

@return $this The current object.
Adds default routes for the API regarding tokens . These routes can be overridden in the child API class .