Interface IUser (namespace Nette\Web)


Authentication and authorization.


Copyright: Copyright (c) 2004, 2010 David Grudl
Located: in /Web/IUser.php (line 21)
Public Method Summary
void
authenticate (string $username, string $password, [mixed $extra = NULL])
Conducts the authentication process.
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
Is this user authenticated?
bool
isInRole (string $role)
Is a user in the specified role?
void
Sets authentication handler.
void
Sets authorization handler.
void
setNamespace (string $namespace)
Changes namespace; allows more users to share a session.
void
signOut ([$clearIdentity = FALSE])
Logs off the user from the current session.

Method Details

line 32

authenticate

public void authenticate (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 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 44

isAuthenticated

public bool isAuthenticated ()

Is this user authenticated?

line 89

isInRole

public bool isInRole (string $role)

Is a user in the specified role?

Input
string $role

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

line 38

signOut

public void signOut ([$clearIdentity = FALSE])

Logs off the user from the current session.

Input
$clearIdentity