Source for file User.php
Documentation is available at User.php
- 1: <?php
- 3: /**
- 4: * Nette Framework
- 5: *
- 6: * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
- 7: *
- 8: * This source file is subject to the "Nette license" that is bundled
- 9: * with this package in the file license.txt.
- 10: *
- 11: * For more information please see https://nette.org
- 12: *
- 19: */
- 29: /**
- 30: * Authentication and authorization.
- 31: *
- 35: */
- 37: {
- 38: /**#@+ sign-out reason {@link User::getSignOutReason()} */
- 42: /**#@-*/
- 50: /** @var array of event handlers; Occurs when the user is successfully authenticated; function(User $sender) */
- 70: /********************* Authentication ****************d*g**/
- 74: /**
- 75: * Conducts the authentication process.
- 81: */
- 83: {
- 87: }
- 100: }
- 104: /**
- 105: * Logs off the user from the current session.
- 108: */
- 110: {
- 114: }
- 118: }
- 119: }
- 123: /**
- 124: * Is this user authenticated?
- 126: */
- 128: {
- 131: }
- 135: /**
- 136: * Returns current user identity, if any.
- 138: */
- 140: {
- 143: }
- 147: /**
- 148: * Sets authentication handler.
- 151: */
- 153: {
- 155: }
- 159: /**
- 160: * Returns authentication handler.
- 162: */
- 164: {
- 167: }
- 169: }
- 173: /**
- 174: * Changes namespace; allows more users to share a session.
- 177: */
- 179: {
- 183: }
- 184: }
- 188: /**
- 189: * Returns current namespace.
- 191: */
- 193: {
- 195: }
- 199: /**
- 200: * Enables sign out after inactivity.
- 205: */
- 207: {
- 212: }
- 218: }
- 222: }
- 226: /**
- 227: * Why was user signed out?
- 229: */
- 231: {
- 234: }
- 238: /**
- 239: * Returns and initializes $this->session.
- 241: */
- 243: {
- 246: }
- 251: }
- 253: $this->session = $session = $sessionHandler->getNamespace('Nette.Web.User/' . $this->namespace);
- 257: }
- 261: }
- 263: if ($session->authenticated && $session->expireBrowser && !$session->browserCheck) { // check if browser was closed?
- 269: }
- 270: }
- 279: }
- 280: }
- 282: }
- 285: }
- 289: /**
- 290: * Set the authenticated status of this user.
- 293: */
- 295: {
- 299: // Session Fixation defence
- 313: }
- 314: }
- 319: {
- 321: }
- 325: /********************* Authorization ****************d*g**/
- 329: /**
- 330: * Returns a list of effective roles that a user has been granted.
- 332: */
- 334: {
- 337: }
- 341: }
- 345: /**
- 346: * Is a user in the specified effective role?
- 349: */
- 351: {
- 353: }
- 357: /**
- 358: * Has a user effective access to the Resource?
- 359: * If $resource is NULL, then the query applies to all resources.
- 363: */
- 365: {
- 369: }
- 373: }
- 376: }
- 380: /**
- 381: * Sets authorization handler.
- 384: */
- 386: {
- 388: }
- 392: /**
- 393: * Returns current authorization handler.
- 395: */
- 397: {
- 400: }
- 402: }
- 406: /********************* backend ****************d*g**/
- 410: /**
- 411: * Returns session handler.
- 413: */
- 415: {
- 417: }
- 419: }
