Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationDI
      • ApplicationLatte
      • ApplicationTracy
      • CacheDI
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsDI
      • FormsLatte
      • Framework
      • HttpDI
      • HttpTracy
      • MailDI
      • ReflectionDI
      • SecurityDI
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Conventions
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
    • Reflection
    • Security
    • Utils
  • none
  • Tracy
    • Bridges
      • Nette

Classes

  • Identity
  • Passwords
  • Permission
  • SimpleAuthenticator
  • User

Interfaces

  • IAuthenticator
  • IAuthorizator
  • IIdentity
  • IResource
  • IRole
  • IUserStorage

Exceptions

  • AuthenticationException
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage
 1: <?php
 2: 
 3: /**
 4:  * This file is part of the Nette Framework (https://nette.org)
 5:  * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 6:  */
 7: 
 8: namespace Nette\Security;
 9: 
10: 
11: /**
12:  * Interface for persistent storage for user object data.
13:  */
14: interface IUserStorage
15: {
16:     /** Log-out reason {@link IUserStorage::getLogoutReason()} */
17:     const MANUAL = 1,
18:         INACTIVITY = 2,
19:         BROWSER_CLOSED = 4;
20: 
21:     /** Log-out behavior */
22:     const CLEAR_IDENTITY = 8;
23: 
24:     /**
25:      * Sets the authenticated status of this user.
26:      * @param  bool
27:      * @return void
28:      */
29:     function setAuthenticated($state);
30: 
31:     /**
32:      * Is this user authenticated?
33:      * @return bool
34:      */
35:     function isAuthenticated();
36: 
37:     /**
38:      * Sets the user identity.
39:      * @return void
40:      */
41:     function setIdentity(IIdentity $identity = NULL);
42: 
43:     /**
44:      * Returns current user identity, if any.
45:      * @return IIdentity|NULL
46:      */
47:     function getIdentity();
48: 
49:     /**
50:      * Enables log out from the persistent storage after inactivity.
51:      * @param  string|int|\DateTime number of seconds or timestamp
52:      * @param  int Log out when the browser is closed | Clear the identity from persistent storage?
53:      * @return void
54:      */
55:     function setExpiration($time, $flags = 0);
56: 
57:     /**
58:      * Why was user logged out?
59:      * @return int
60:      */
61:     function getLogoutReason();
62: 
63: }
64: 
Nette 2.3-20161221 API API documentation generated by ApiGen 2.8.0