Interface IUser (namespace Nette\Web)


User authentication and authorization.


Copyright: Copyright (c) 2004, 2010 David Grudl
Located: in /Web/IUser.php (line 21)
Public Method Summary
IAuthenticator
Returns authentication handler.
IAuthorizator
Returns current authorization handler.
IIdentity
Returns current user identity, if any.
string
Returns current namespace.
array
Returns a list of roles that a user has been granted.
bool
Has a user access to the Resource?
bool
isInRole (string $role)
Is a user in the specified role?
bool
Is this user authenticated?
void
login (string $username, string $password, [mixed $extra = NULL])
Conducts the authentication process.
void
logout ([$clearIdentity = FALSE])
Logs out the user from the current session.
void
Sets authentication handler.
void
Sets authorization handler.
void
setNamespace (string $namespace)
Changes namespace; allows more users to share a session.

Method Details

line 63

getAuthenticationHandler

public IAuthenticator getAuthenticationHandler ()

Returns authentication handler.

line 108

getAuthorizationHandler

public IAuthorizator getAuthorizationHandler ()

Returns current authorization handler.

line 50

getIdentity

public IIdentity getIdentity ()

Returns current user identity, if any.

line 76

getNamespace

public string getNamespace ()

Returns current namespace.

line 82

getRoles

public array getRoles ()

Returns a list of roles that a user has been granted.

line 95

isAllowed

public bool isAllowed ()

Has a user access to the Resource?

line 89

isInRole

public bool isInRole (string $role)

Is a user in the specified role?

Input
string $role

line 44

isLoggedIn

public bool isLoggedIn ()

Is this user authenticated?

line 32

login

public void login (string $username, string $password, [mixed $extra = NULL])

Conducts the authentication process.

Input
string $username
string $password
mixed $extra
Output
void  
Throws
throws AuthenticationException if authentication was not successful

line 38

logout

public void logout ([$clearIdentity = FALSE])

Logs out the user from the current session.

Input
$clearIdentity

line 57

setAuthenticationHandler

public void setAuthenticationHandler ($handler)

Sets authentication handler.

Input
$handler

line 102

setAuthorizationHandler

public void setAuthorizationHandler ($handler)

Sets authorization handler.

Input
$handler

line 70

setNamespace

public void setNamespace (string $namespace)

Changes namespace; allows more users to share a session.

Input
string $namespace