Issue loading my Authentication Plugin Class

#1

am trying to write a CakePHP Authentication plugin and am following and structuring it after this repository: https://github.com/ADmad/cakephp-jwt-auth

I am still at the early stages, trying to get my plugin to load during cakePHPs constructAuthenticate() method. I have narrowed down my issue to this method never finding my class when it calls class_exists()

I have Project structure as follows:

`App/

plugins/
src/
    Controller/
        AppController.php
    Model/
vendor/
    Admad/
        cakephp-jwt-auth/
            src/
                Auth/
                    JwtAuthenticate.php
            composer.json
    nates/
        cakephp-total-auth/
            src/
                Auth/
                    TotalAuthenticate.php
   composer.json`

TotalAuthenticate is the class I’m trying to load, and it’s namespace as defined in TotalAuthenticate.php is:

namespace nates\TotalAuth\auth;

After some debugging I have found that the Path being passed to classs_exists() is:

nates\TotalAuth\Auth\TotalAuthenticate

I have compared all of this info to the Admad/JwtAuth plugin and the relative paths all match up, and that plugin loads just fine so I’m really at a loss at whats going on here and why my plugin won’t load.

My Autoload in App/composer.json Looks as such:

`"autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Test\\": "tests/",
            "Cake\\Test\\": "vendor/cakephp/cakephp/tests/"
        }
    },`

And my Plugins composer.json :

`"autoload": {
    "psr-4": {
      "nates\\TotalAuth\\": "src"
    }
  },
  "autoload-dev": {
    "psr-4": {
//      "ADmad\\JwtAuth\\Test\\": "tests"
    }`