hamishcampbell/silverstripe-auth-external

SilverStripe 3 compatibility

Closed this issue · 3 comments

I'm looking at implementing this module under SS3. I've only had half an hour to look at the moment, and I can see there are some changes needed.
I found what seems to be the latest version at this site here (on the silverstripe modules page, I could only find a svn link, which is older).

However after installing this, following the installation instructions and running /dev/build there are deprecation error, indicating that this code has not been updated at all for SS3:

DataObjectDecorator is deprecated. DataObjectDecorator is deprecated. Use DataExtension instead.

Strict Standards: Declaration of ExternalAuthenticatedRole::canEdit() should be compatible with that of DataExtension::canEdit() in auth_external\code\ExternalAuthenticatedRole.php on line 16

Strict Standards: Declaration of ExternalAuthenticatedRole::extraStatics() should be compatible with that of DataExtension::extraStatics() in auth_external\code\ExternalAuthenticatedRole.php on line 16

Strict Standards: Declaration of ExternalAuthenticatedRole::updateCMSFields() should be compatible with that of DataExtension::updateCMSFields() in auth_external\code\ExternalAuthenticatedRole.php on line 16

You turn off this deprecation error (not fix the code, mind) you can open the framework/_config file and change line 60 to:

Deprecation::notification_version('3.0.0-dev');    

Now the login box shows up, after submitting the login however there's another deprecation error:

Director::redirect is deprecated. Use Controller->redirect() instead. Called from ExternalLoginForm->dologin.    

At this point I concluded that it's better use of my time to see if someone else has got this working, or attempt to fix the module myself. Hope this helps.

Hi @svandragt - this should be the most current repo. I haven't had a change to look at SS3 support yet. From your post, those changes should be reasonably straight forward, but I'm not familiar with what other changes have been made to the auth model at this stage.

Hi @hamishcampbell - I've got an implementation working on my test system and will create a ss3-compatibility branch and send you a pull request. It's not extensively tested (works with my ActiveDirectory logon).

Push request merged so can close this now.