I have Drupal setup with this module and everything works very well, thanks you for the hard work you've put in.

We require that our users must be logged into this site to see any information. It's being used for internal company use by our service technicians.

I would like a feature to be added that will redirect a user automatically to the SSO login page with a properly set up RETURNTO path.

Flow would be, we send an email with a link to a specific page.
They click the link and the browser opens.
site gets redirected to SSO
They either log in because they haven't or get redirect back to proper link on the Drupal site because they already are.

Looking at the UI, I didn't see a method for this, which means that for any path we would have to provide a link to login for them to get to the SSO site. Just a step our company wants to remove if at all possible.

Gran

Comments

snufkin’s picture

You should point the user to the /saml_login page, which then redirects the users to the SSO login page.

graper’s picture

Did some digging and found the module Require Login. This redirects to the Drupal Login, but is a step closer. While I can use this and make modifications, I think something like this that redirects to saml_login, inside this module would be beneficial to this module's usage.

Just a thought.

snufkin’s picture

Status: Active » Closed (works as designed)

While I agree that this would be a useful feature, this module should focus on providing the authentication functionality, and not related functionality. Adding extra features like that into this module would make it complex and make it harder to maintain. You can already achieve this functionality with additional contributed modules, like Rules for instance.

gaëlg’s picture

I just did it with a simple custom module:

function my_module_init() {
  if (user_is_anonymous() && !in_array($_GET['q'], array('saml_login', 'user/logout', 'user/login'))) {
    drupal_goto('saml_login', array('query' => array('ReturnTo' => url($_GET['q'], array('absolute' => TRUE)))));
  }
}
graper’s picture

@snufkin,

Thanks for the input.

@GaëlG
Thanks for the sample code.