summaryrefslogtreecommitdiffstats
path: root/Authentication/AuthenticationTrustResolverInterface.php
diff options
context:
space:
mode:
authorJohannes Schmitt <schmittjoh@gmail.com>2010-12-12 09:41:47 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2010-12-12 10:49:43 +0100
commitb8fc4a14f4cff6bb490cf04422716a2949b6f3bc (patch)
tree5b4ce483f41293c29fab9a7110c57e72ba216188 /Authentication/AuthenticationTrustResolverInterface.php
parentfed3bb4daa2f8205dc0a873d16eddccc3e44bb8a (diff)
downloadsymfony-security-b8fc4a14f4cff6bb490cf04422716a2949b6f3bc.zip
symfony-security-b8fc4a14f4cff6bb490cf04422716a2949b6f3bc.tar.gz
symfony-security-b8fc4a14f4cff6bb490cf04422716a2949b6f3bc.tar.bz2
added authentication trust resolver
Diffstat (limited to 'Authentication/AuthenticationTrustResolverInterface.php')
-rw-r--r--Authentication/AuthenticationTrustResolverInterface.php53
1 files changed, 53 insertions, 0 deletions
diff --git a/Authentication/AuthenticationTrustResolverInterface.php b/Authentication/AuthenticationTrustResolverInterface.php
new file mode 100644
index 0000000..e57bb65
--- /dev/null
+++ b/Authentication/AuthenticationTrustResolverInterface.php
@@ -0,0 +1,53 @@
+<?php
+
+namespace Symfony\Component\Security\Authentication;
+
+use Symfony\Component\Security\Authentication\Token\TokenInterface;
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * Interface for resolving the authentication status of a given token.
+ *
+ * @author Johannes M. Schmitt <schmittjoh@gmail.com>
+ */
+interface AuthenticationTrustResolverInterface
+{
+ /**
+ * Resolves whether the passed token implementation is authenticated
+ * anonymously.
+ *
+ * If null is passed, the method must return false.
+ *
+ * @param TokenInterface $token
+ *
+ * @return Boolean
+ */
+ function isAnonymous(TokenInterface $token = null);
+
+ /**
+ * Resolves whether the passed token implementation is authenticated
+ * using remember-me capabilities.
+ *
+ * @param TokenInterface $token
+ *
+ * @return Boolean
+ */
+ function isRememberMe(TokenInterface $token = null);
+
+ /**
+ * Resolves whether the passed token implementation is fully authenticated.
+ *
+ * @param TokenInterface $token
+ *
+ * @return Boolean
+ */
+ function isFullFledged(TokenInterface $token = null);
+}