diff options
author | Jaime Pérez <jaime.perez@uninett.no> | 2016-07-04 13:54:25 +0200 |
---|---|---|
committer | Jaime Pérez <jaime.perez@uninett.no> | 2016-07-04 13:54:25 +0200 |
commit | 0c660fda14af1111075d9f49b9448d5665b37143 (patch) | |
tree | 7580a1601aa1c4415076a9663250365c91071092 /lib/SimpleSAML | |
parent | bcd0ae9bfc9aa6b01502bc029284841f2ee35061 (diff) | |
download | simplesamlphp-0c660fda14af1111075d9f49b9448d5665b37143.zip simplesamlphp-0c660fda14af1111075d9f49b9448d5665b37143.tar.gz simplesamlphp-0c660fda14af1111075d9f49b9448d5665b37143.tar.bz2 |
Add error codes to the SimpleSAML\Error\CannotSetCookie exception.
This way we can discern why we couldn't set a cookie, and act accordingly.
Diffstat (limited to 'lib/SimpleSAML')
-rw-r--r-- | lib/SimpleSAML/Error/CannotSetCookie.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/SimpleSAML/Error/CannotSetCookie.php b/lib/SimpleSAML/Error/CannotSetCookie.php index 65b6ee8..31a25b0 100644 --- a/lib/SimpleSAML/Error/CannotSetCookie.php +++ b/lib/SimpleSAML/Error/CannotSetCookie.php @@ -12,4 +12,25 @@ namespace SimpleSAML\Error; class CannotSetCookie extends \SimpleSAML_Error_Exception { + /** + * The exception was thrown for unknown reasons. + * + * @var int + */ + const UNKNOWN = 0; + + /** + * The exception was due to the HTTP headers being already sent, and therefore we cannot send additional headers to + * set the cookie. + * + * @var int + */ + const HEADERS_SENT = 1; + + /** + * The exception was due to trying to set a secure cookie over an insecure channel. + * + * @var int + */ + const SECURE_COOKIE = 2; } |