diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2013-12-08 06:36:27 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2013-12-08 06:36:27 +0400 |
commit | 4cafa9e3c79051476c54ad81a3e73e7242e7775a (patch) | |
tree | 431054418bf63b5094e5c4be961ab420278d289e /core/Nonce.php | |
parent | 87d676dbff31adb4c1cf389cd66511434ab925ab (diff) |
Refs #4200 revised some of class/method docs.
Diffstat (limited to 'core/Nonce.php')
-rw-r--r-- | core/Nonce.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/Nonce.php b/core/Nonce.php index c877228a91..e90c5af374 100644 --- a/core/Nonce.php +++ b/core/Nonce.php @@ -19,7 +19,7 @@ use Piwik\Session\SessionNamespace; * part of a robust defense against cross-site request forgery (CSRF/XSRF). This * class provides static methods that create and manage nonce values. * - * Nonces in Piwik are stored as a session variable and have a configurable expiration: + * Nonces in Piwik are stored as a session variable and have a configurable expiration. * * Learn more about nonces [here](http://en.wikipedia.org/wiki/Cryptographic_nonce). * @@ -29,7 +29,7 @@ use Piwik\Session\SessionNamespace; class Nonce { /** - * Returns the existing nonce. If none exists, a new nonce will be generated. + * Returns an existing nonce by ID. If none exists, a new nonce will be generated. * * @param string $id Unique id to avoid namespace conflicts, e.g., `'ModuleName.ActionName'`. * @param int $ttl Optional time-to-live in seconds; default is 5 minutes. (ie, in 5 minutes, @@ -66,9 +66,9 @@ class Nonce * The request is valid if the referrer is a local URL (see {@link Url::isLocalUrl()}) * and if the HTTP origin is valid (see {@link getAcceptableOrigins()}). * - * @param string $id Unique id - * @param string $cnonce Nonce sent to client - * @return bool true if valid; false otherwise + * @param string $id The nonce's unique ID. See {@link getNonce()}. + * @param string $cnonce Nonce sent from client. + * @return bool `true` if valid; `false` otherwise. */ static public function verifyNonce($id, $cnonce) { @@ -110,7 +110,7 @@ class Nonce } /** - * Returns Origin HTTP header or false if not found. + * Returns the **Origin** HTTP header or `false` if not found. * * @return string|bool */ @@ -123,7 +123,7 @@ class Nonce } /** - * Returns a list acceptable values for the HTTP Origin header. + * Returns a list acceptable values for the HTTP **Origin** header. * * @return array */ |