public function onSessionStart($session, $transport)
    {
        $session->register(
            "thruway.auth.{$this->getMethodName()}.onhello",
            [$this, 'processHello'],
            ['replace_orphaned_session' => 'yes']
        )
            ->then(function () use ($session) {
                $session->register(
                    "thruway.auth.{$this->getMethodName()}.onauthenticate",
                    [$this, 'preProcessAuthenticate'],
                    ['replace_orphaned_session' => 'yes']
                )->then(function () use ($session) {

                    $registrations                 = new \stdClass();
                    $registrations->onhello        = "thruway.auth.{$this->getMethodName()}.onhello";
                    $registrations->onauthenticate = "thruway.auth.{$this->getMethodName()}.onauthenticate";

                    $session->call('thruway.auth.registermethod',
                        [
                            $this->getMethodName(),
                            $registrations,
                            $this->getAuthRealms()
                        ]
                    )->then(function ($args) {
                        Logger::debug($this, "Authentication Method Registration Successful: {$this->getMethodName()}");
                    });
                });
            });
    }