class SecureLoginPathProcessor in Secure Login 8
Secure login path processor.
This path processor applies a configured secure base URL. It is useful for sites that have multiple insecure base URLs and an SSL certificate valid only for one secure base URL.
Hierarchy
- class \Drupal\securelogin\SecureLoginPathProcessor implements OutboundPathProcessorInterface
Expanded class hierarchy of SecureLoginPathProcessor
1 string reference to 'SecureLoginPathProcessor'
1 service uses SecureLoginPathProcessor
File
- src/
SecureLoginPathProcessor.php, line 17
Namespace
Drupal\secureloginView source
class SecureLoginPathProcessor implements OutboundPathProcessorInterface {
/**
* The configured secure login base URL.
*
* @var string
*/
protected $baseUrl;
/**
* Constructs secure login path processor.
*/
public function __construct(ConfigFactoryInterface $config_factory) {
$this->baseUrl = $config_factory
->get('securelogin.settings')
->get('base_url');
}
/**
* {@inheritdoc}
*/
public function processOutbound($path, &$options = [], Request $request = NULL, BubbleableMetadata $bubbleable_metadata = NULL) {
if (!empty($options['https']) && $this->baseUrl) {
$options['absolute'] = TRUE;
$options['base_url'] = $this->baseUrl;
}
return $path;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SecureLoginPathProcessor:: |
protected | property | The configured secure login base URL. | |
SecureLoginPathProcessor:: |
public | function |
Processes the outbound path. Overrides OutboundPathProcessorInterface:: |
|
SecureLoginPathProcessor:: |
public | function | Constructs secure login path processor. |