Skip to content

Commit f13c9f3

Browse files
committed
Fix phpdoc
1 parent 342a736 commit f13c9f3

File tree

4 files changed

+35
-21
lines changed

4 files changed

+35
-21
lines changed

lib/Saml2/Auth.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class OneLogin_Saml2_Auth
129129
* (SAMLResponse, LogoutResponse). If the SAMLResponse was
130130
* encrypted, by default tries to return the decrypted XML
131131
*
132-
* @var string
132+
* @var string|\DomDocument|null
133133
*/
134134
private $_lastResponse;
135135

@@ -215,13 +215,13 @@ public function processResponse($requestId = null)
215215
/**
216216
* Process the SAML Logout Response / Logout Request sent by the IdP.
217217
*
218-
* @param bool $keepLocalSession When false will destroy the local session, otherwise will keep it
219-
* @param string|null $requestId The ID of the LogoutRequest sent by this SP to the IdP
220-
* @param bool $retrieveParametersFromServer
221-
* @param callable $cbDeleteSession
222-
* @param bool $stay True if we want to stay (returns the url string) False to redirect
218+
* @param bool $keepLocalSession When false will destroy the local session, otherwise will keep it
219+
* @param string|null $requestId The ID of the LogoutRequest sent by this SP to the IdP
220+
* @param bool $retrieveParametersFromServer True if we want to use parameters from $_SERVER to validate the signature
221+
* @param callable $cbDeleteSession Callback to be executed to delete session
222+
* @param bool $stay True if we want to stay (returns the url string) False to redirect
223223
*
224-
* @return string|void
224+
* @return string|null
225225
*
226226
* @throws OneLogin_Saml2_Error
227227
*/
@@ -386,7 +386,7 @@ public function getSessionIndex()
386386
/**
387387
* Returns the SessionNotOnOrAfter
388388
*
389-
* @return DateTime|null The SessionNotOnOrAfter of the assertion
389+
* @return int|null The SessionNotOnOrAfter of the assertion
390390
*/
391391
public function getSessionExpiration()
392392
{
@@ -454,10 +454,10 @@ public function getAttributeWithFriendlyName($friendlyName)
454454
*
455455
* @param string|null $returnTo The target URL the user should be returned to after login.
456456
* @param array $parameters Extra parameters to be added to the GET
457-
* @param bool $forceAuthn When true the AuthNReuqest will set the ForceAuthn='true'
458-
* @param bool $isPassive When true the AuthNReuqest will set the Ispassive='true'
457+
* @param bool $forceAuthn When true the AuthNRequest will set the ForceAuthn='true'
458+
* @param bool $isPassive When true the AuthNRequest will set the Ispassive='true'
459459
* @param bool $stay True if we want to stay (returns the url string) False to redirect
460-
* @param bool $setNameIdPolicy When true the AuthNReuqest will set a nameIdPolicy element
460+
* @param bool $setNameIdPolicy When true the AuthNRueqest will set a nameIdPolicy element
461461
*
462462
* @return string|null If $stay is True, it return a string with the SLO URL + LogoutRequest + parameters
463463
*/
@@ -560,7 +560,7 @@ public function getSSOurl()
560560
/**
561561
* Gets the SLO url.
562562
*
563-
* @return string The url of the Single Logout Service
563+
* @return string|null The url of the Single Logout Service
564564
*/
565565
public function getSLOurl()
566566
{

lib/Saml2/AuthnRequest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ public function __construct(OneLogin_Saml2_Settings $settings, $forceAuthn = fal
141141
* Returns deflated, base64 encoded, unsigned AuthnRequest.
142142
*
143143
* @param bool|null $deflate Whether or not we should 'gzdeflate' the request body before we return it.
144+
*
145+
* @return string
144146
*/
145147
public function getRequest($deflate = null)
146148
{

lib/Saml2/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ public function validateSignedElements($signedElements)
950950
/**
951951
* Extracts a node from the DOMDocument (Assertion).
952952
*
953-
* @param string $assertionXpath Xpath Expresion
953+
* @param string $assertionXpath Xpath Expression
954954
*
955955
* @return DOMNodeList The queried node
956956
*

lib/Saml2/Utils.php

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ public static function setBaseURLPath($baseurlpath)
406406
}
407407

408408
/**
409-
* return string The baseurlpath to be used when constructing URLs
409+
* @return string The baseurlpath to be used when constructing URLs
410410
*/
411411
public static function getBaseURLPath()
412412
{
@@ -716,7 +716,7 @@ public static function parseSAML2Time($time)
716716
* duration to. Optional, default to the
717717
* current time.
718718
*
719-
* @return int|null The new timestamp, after the duration is applied.
719+
* @return int The new timestamp, after the duration is applied.
720720
*
721721
* @throws Exception
722722
*/
@@ -799,8 +799,8 @@ public static function parseDuration($duration, $timestamp = null)
799799
/**
800800
* Compares 2 dates and returns the earliest.
801801
*
802-
* @param string $cacheDuration The duration, as a string.
803-
* @param string $validUntil The valid until date, as a string or as a timestamp
802+
* @param string|null $cacheDuration The duration, as a string.
803+
* @param string|int|null $validUntil The valid until date, as a string or as a timestamp
804804
*
805805
* @return int|null $expireTime The expiration time.
806806
*/
@@ -830,9 +830,9 @@ public static function getExpireTime($cacheDuration = null, $validUntil = null)
830830
/**
831831
* Extracts nodes from the DOMDocument.
832832
*
833-
* @param DOMDocument $dom The DOMDocument
834-
* @param string $query Xpath Expresion
835-
* @param DomElement $context Context Node (DomElement)
833+
* @param DOMDocument $dom The DOMDocument
834+
* @param string $query Xpath Expresion
835+
* @param DomElement|null $context Context Node (DomElement)
836836
*
837837
* @return DOMNodeList The queried nodes
838838
*/
@@ -953,7 +953,7 @@ public static function formatFingerPrint($fingerprint)
953953
*
954954
* @param string $value fingerprint
955955
* @param string $spnq SP Name Qualifier
956-
* @param string $format SP Format
956+
* @param string|null $format SP Format
957957
* @param string|null $cert IdP Public cert to encrypt the nameID
958958
* @param string|null $nq IdP Name Qualifier
959959
*
@@ -1381,6 +1381,18 @@ public static function validateSign($xml, $cert = null, $fingerprint = null, $fi
13811381
return $valid;
13821382
}
13831383

1384+
/**
1385+
* Validates a binary signature
1386+
*
1387+
* @param string $messageType Type of SAML Message
1388+
* @param array $getData HTTP GET array
1389+
* @param array $idpData IdP setting data
1390+
* @param bool $retrieveParametersFromServer Indicates where to get the values in order to validate the Sign, from getData or from $_SERVER
1391+
*
1392+
* @return bool
1393+
*
1394+
* @throws Exception
1395+
*/
13841396
public static function validateBinarySign($messageType, $getData, $idpData, $retrieveParametersFromServer = false)
13851397
{
13861398
if (!isset($getData['SigAlg'])) {

0 commit comments

Comments
 (0)