This module implements login with WAYF, a Danish SAML based Single Sign-On system.
The module is different from other SAML2 login modules as it is selfcontained and the
focus is to make it very easy for service providers to use WAYF.

Project page : https://drupal.org/sandbox/thelmer/1986370
git clone --branch 7.x-1.x git://git.drupal.org/sandbox/thelmer/1986370.git wayf_dk_login

Reviews of other projects:
https://drupal.org/node/2100291#comment-7914869
https://drupal.org/node/2112165#comment-7968423

Comments

thamba’s picture

Hi,

Nice module. A quick check on the automated review tool revealed a few errors. You might want to check: http://ventral.org/pareview/httpgitdrupalorgsandboxthelmer1986370git

I did a manual review of your module as well and here are some minor issues I found:

  • You should use the 7.x-1.x branch as your default. Read Setting default branch
  • Your README.txt could contain more information on how to configure the module.
  • You have used the short PHP opening tag in your tpl.php file which is against the Drupal coding standard.

Other than that its a well written module. Good luck!

PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

diolan’s picture

Status: Needs review » Needs work

Hello,
Interesting module, but I have some things to point after manual review:
1. It seems that you are use ctools plugin API, but you don't add the dependency into the .info file.
2. You are using user visible text that is not ready for translation in wayf_dk_login_help() function. I think it would be better to enclosure the text into the t() function.
3. Your module creates a number of variables (e.g. wayf_idp_certivicate, wayf_idp_sso), but you don't implement the hook_uninstall() to remove these variables.

thelmer’s picture

Status: Needs work » Needs review

Thank you for the reviews, I've changed the following :

1) Code cleaned up to pass PHP_CodeSniffer / coders
2) Removed short tags from template file
3) Added t() to all user-oriented strings
4) Implemented the hook-uninstall to remove variables defined by the module
5) Added some defaults for the idp metadata
6) Updated the README.txt with configuration details
7) Added cttols dependency
8) Changed the default branch to 7.x-1.x

thelmer’s picture

Issue summary: View changes

git clone url updated

miksan’s picture

Status: Needs review » Needs work

Hi Tom.
Nice module!
The code is well structured and it is easy to get an overview.

I have a few comments:

1) wayf_dk_login.module, line 307:
If for some reason the meta data service is down the rest of the function will fail.
Instead you will get various errors and I am not sure that you will be able to follow the contract of your function.
The docblock in line 287 says the the function will be returning an object:
* @return [object]
I suggest that you introduce some error handling and consider what the return value should be in case of an error.

2) Although it is not essential for the functionality of the module, I do not find any watchdog function calls.
I think it can come in handy to have a few logged actions throughout the module.
It can help a debugging process to make log entries in case of a success or an error.
For instance in wayf_dk_login.module, line 144 in the function wayf_dk_login__endpoint() it would make sense to put in some watchdog calls:

        if (!$account) {
          drupal_set_message(t("Error saving user account."), 'error');
          drupal_goto('<front>');
          return;
        }
      }

      if (!$account) {
        drupal_set_message(t("Login failed."), 'error');
        drupal_goto('<front>');
        return;
      }

3) The last comment is a very strict one :) :
I your code I find multiple inline comments notated in C style (/* */).
Instead repeat the // single-line comment for every line:
https://drupal.org/node/1354#inline

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

I'm a robot and this is an automated message from Project Applications Scraper.

thelmer’s picture

Status: Closed (won't fix) » Needs review

1) I have added some error handling if WAYF's metadata service is down

2) 3 watchdog notices added :
"Error saving user account : %name."
"Login failed : %name."
"New account created : %name."

3) fixed

other) Added dependency on date and date_api to .info

thelmer’s picture

Issue summary: View changes

git clone URL updated

kscheirer’s picture

Status: Needs review » Reviewed & tested by the community

In wayf_dk_login_form_user_login_alter() instead of creating the img tag manually, can you use theme('image') instead? Seems like a well thought out module.

----
Top Shelf Modules - Crafted, Curated, Contributed.

thelmer’s picture

The image in the .module file is now rendered with theme('image

thelmer’s picture

Issue summary: View changes

Added other project review

thelmer’s picture

Issue summary: View changes

New review of other project added

kscheirer’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

It's been a month without any problems reported, so I'm promoting this myself as per https://drupal.org/node/1125818.

Thanks for your contribution, thelmer!

I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

----
Top Shelf Modules - Crafted, Curated, Contributed.

kscheirer’s picture

Congrats on 10 years in Drupal! :)

thelmer’s picture

Hi kscheirer
Thanks for the promotion.

I have promoted my project and created a release tag.

When I try to "Add new release" under Edit ->Releases I get an error message "WAYF.DK Login does not have project releases enabled." Can this be related to the D7 upgrade ?

Tom

kscheirer’s picture

Looks like we have a bug from the D7 upgrade. I've updated #2132003: Unable to enable releases for Full Projects with 'project_has_releases' = FALSE to include your module, this will hopefully be resolved soon.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.