Skip to content

Commit 55d36cf

Browse files
authored
Merge pull request #197 from danmichaelo/patch-3
Fix static calls in Saml2Auth
2 parents 825e2e9 + 13ae4f2 commit 55d36cf

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/Aacotroneo/Saml2/Saml2Auth.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use OneLogin\Saml2\Auth as OneLogin_Saml2_Auth;
66
use OneLogin\Saml2\Error as OneLogin_Saml2_Error;
7-
use OneLogin\Saml2\Utils as OneLogin_Saml2_Utils;
87
use Aacotroneo\Saml2\Events\Saml2LogoutEvent;
98

109
use Log;
@@ -54,13 +53,13 @@ public static function loadOneLoginAuthFromIpdConfig($idpName)
5453
$config['sp']['singleLogoutService']['url'] = URL::route('saml2_sls', $idpName);
5554
}
5655
if (strpos($config['sp']['privateKey'], 'file://')===0) {
57-
$config['sp']['privateKey'] = $this->extractPkeyFromFile($config['sp']['privateKey']);
56+
$config['sp']['privateKey'] = static::extractPkeyFromFile($config['sp']['privateKey']);
5857
}
5958
if (strpos($config['sp']['x509cert'], 'file://')===0) {
60-
$config['sp']['x509cert'] = $this->extractCertFromFile($config['sp']['x509cert']);
59+
$config['sp']['x509cert'] = static::extractCertFromFile($config['sp']['x509cert']);
6160
}
6261
if (strpos($config['idp']['x509cert'], 'file://')===0) {
63-
$config['idp']['x509cert'] = $this->extractCertFromFile($config['idp']['x509cert']);
62+
$config['idp']['x509cert'] = static::extractCertFromFile($config['idp']['x509cert']);
6463
}
6564

6665
return new OneLogin_Saml2_Auth($config);
@@ -229,7 +228,7 @@ protected static function extractPkeyFromFile($path) {
229228
}
230229
openssl_pkey_export($res, $pkey);
231230
openssl_pkey_free($res);
232-
return $this->extractOpensslString($pkey, 'PRIVATE KEY');
231+
return static::extractOpensslString($pkey, 'PRIVATE KEY');
233232
}
234233

235234
protected static function extractCertFromFile($path) {
@@ -239,7 +238,7 @@ protected static function extractCertFromFile($path) {
239238
}
240239
openssl_x509_export($res, $cert);
241240
openssl_x509_free($res);
242-
return $this->extractOpensslString($cert, 'CERTIFICATE');
241+
return static::extractOpensslString($cert, 'CERTIFICATE');
243242
}
244243

245244
protected static function extractOpensslString($keyString, $delimiter) {

0 commit comments

Comments
 (0)