diff options
author | Ryan Weaver <ryan@thatsquality.com> | 2011-05-10 17:07:42 -0500 |
---|---|---|
committer | Ryan Weaver <ryan@thatsquality.com> | 2011-05-11 15:09:36 -0500 |
commit | 70cfab061f99a8c44c168cb3b493b9eac88159a1 (patch) | |
tree | 4ef583cef9c29491f2bfff133f7b7027c3eb6f18 /Core | |
parent | d01acca4e159a5537fb7ceb854d284bd7f26887d (diff) | |
download | symfony-security-70cfab061f99a8c44c168cb3b493b9eac88159a1.zip symfony-security-70cfab061f99a8c44c168cb3b493b9eac88159a1.tar.gz symfony-security-70cfab061f99a8c44c168cb3b493b9eac88159a1.tar.bz2 |
[Security] Improving the exception when the security context has no token
This either mostly - or always - means that no firewall is currently activated. This message tries to alert the user to this.
Reword
Diffstat (limited to 'Core')
-rw-r--r-- | Core/SecurityContext.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Core/SecurityContext.php b/Core/SecurityContext.php index 575f94b..c492339 100644 --- a/Core/SecurityContext.php +++ b/Core/SecurityContext.php @@ -58,7 +58,7 @@ class SecurityContext implements SecurityContextInterface public final function isGranted($attributes, $object = null) { if (null === $this->token) { - throw new AuthenticationCredentialsNotFoundException('The security context contains no authentication token.'); + throw new AuthenticationCredentialsNotFoundException('The security context contains no authentication token. One possible reason may be that there is no firewall configured for this URL.'); } if ($this->alwaysAuthenticate || !$this->token->isAuthenticated()) { |