Packages

  • Nette
    • Application
      • Application\Diagnostics
      • Application\Responses
      • Application\Routers
      • Application\UI
    • Caching
      • Caching\Storages
    • ComponentModel
    • Config
    • Database
      • Database\Diagnostics
      • Database\Drivers
      • Database\Reflection
      • Database\Table
    • DI
    • Diagnostics
    • Forms
      • Forms\Controls
      • Forms\Rendering
    • Http
    • Iterators
    • Latte
      • Latte\Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
    • Templating
    • Utils
  • NetteModule
  • None
  • PHP

Classes

  • NHttpContext
  • NHttpRequest
  • NHttpRequestFactory
  • NHttpResponse
  • NHttpUploadedFile
  • NSession
  • NSessionSection
  • NUrl
  • NUrlScript
  • NUser

Interfaces

  • IHttpRequest
  • IHttpResponse
  • ISessionStorage
  • IUser
  • Overview
  • Package
  • Class
  • Tree
  1: <?php
  2: 
  3: /**
  4:  * This file is part of the Nette Framework (http://nette.org)
  5:  *
  6:  * Copyright (c) 2004, 2011 David Grudl (http://davidgrudl.com)
  7:  *
  8:  * For the full copyright and license information, please view
  9:  * the file license.txt that was distributed with this source code.
 10:  * @package Nette\Http
 11:  */
 12: 
 13: 
 14: 
 15: /**
 16:  * User authentication and authorization.
 17:  *
 18:  * @author     David Grudl
 19:  * @package Nette\Http
 20:  */
 21: interface IUser
 22: {
 23: 
 24:     /**
 25:      * Conducts the authentication process.
 26:      * @param  mixed optional parameter (e.g. username)
 27:      * @param  mixed optional parameter (e.g. password)
 28:      * @return void
 29:      * @throws NAuthenticationException if authentication was not successful
 30:      */
 31:     function login();
 32: 
 33:     /**
 34:      * Logs out the user from the current session.
 35:      * @return void
 36:      */
 37:     function logout($clearIdentity = FALSE);
 38: 
 39:     /**
 40:      * Is this user authenticated?
 41:      * @return bool
 42:      */
 43:     function isLoggedIn();
 44: 
 45:     /**
 46:      * Returns current user identity, if any.
 47:      * @return IIdentity
 48:      */
 49:     function getIdentity();
 50: 
 51:     /**
 52:      * Sets authentication handler.
 53:      * @param  IAuthenticator
 54:      * @return void
 55:      */
 56:     function setAuthenticator(IAuthenticator $handler);
 57: 
 58:     /**
 59:      * Returns authentication handler.
 60:      * @return IAuthenticator
 61:      */
 62:     function getAuthenticator();
 63: 
 64:     /**
 65:      * Changes namespace; allows more users to share a session.
 66:      * @param  string
 67:      * @return void
 68:      */
 69:     function setNamespace($namespace);
 70: 
 71:     /**
 72:      * Returns current namespace.
 73:      * @return string
 74:      */
 75:     function getNamespace();
 76: 
 77:     /**
 78:      * Returns a list of roles that a user has been granted.
 79:      * @return array
 80:      */
 81:     function getRoles();
 82: 
 83:     /**
 84:      * Is a user in the specified role?
 85:      * @param  string
 86:      * @return bool
 87:      */
 88:     function isInRole($role);
 89: 
 90:     /**
 91:      * Has a user access to the Resource?
 92:      * @return bool
 93:      */
 94:     function isAllowed();
 95: 
 96:     /**
 97:      * Sets authorization handler.
 98:      * @param  IAuthorizator
 99:      * @return void
100:      */
101:     function setAuthorizator(IAuthorizator $handler);
102: 
103:     /**
104:      * Returns current authorization handler.
105:      * @return IAuthorizator
106:      */
107:     function getAuthorizator();
108: 
109: }
110: 
Nette Framework 2.0beta1 (for PHP 5.2) API API documentation generated by ApiGen 2.3.0