You are here

function _simplesamlphp_auth_forcehttps_rewrite in simpleSAMLphp Authentication 6.3

Same name and namespace in other branches
  1. 6.2 simplesamlphp_auth.module \_simplesamlphp_auth_forcehttps_rewrite()
  2. 7 simplesamlphp_auth.module \_simplesamlphp_auth_forcehttps_rewrite()
  3. 7.2 simplesamlphp_auth.module \_simplesamlphp_auth_forcehttps_rewrite()

Forces HTTPS connections.

1 call to _simplesamlphp_auth_forcehttps_rewrite()
simplesamlphp_auth_loginpage in ./simplesamlphp_auth.module
Represents the Drupal page (saml_login), which triggers user authentication against the SimpleSAMLphp service provider.

File

./simplesamlphp_auth.module, line 725
simpleSAMLphp authentication module for Drupal.

Code

function _simplesamlphp_auth_forcehttps_rewrite($url) {
  if (variable_get('simplesamlphp_auth_forcehttps', TRUE)) {
    $url = str_replace('http://', 'https://', $url);
    _simplesaml_auth_debug('forcehttps rewrite: ' . $url);
  }
  return $url;
}