Interface IUser (namespace Nette\Web)


Authentication and authorization.


Author: David Grudl
Copyright: Copyright (c) 2004, 2009 David Grudl
Located: in /Web/IUser.php (line 30)
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 41

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 72

getAuthenticationHandler

public IAuthenticator getAuthenticationHandler ()

Returns authentication handler.

line 117

getAuthorizationHandler

public IAuthorizator getAuthorizationHandler ()

Returns current authorization handler.

line 59

getIdentity

public IIdentity getIdentity ()

Returns current user identity, if any.

line 85

getNamespace

public string getNamespace ()

Returns current namespace.

line 91

getRoles

public array getRoles ()

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

line 104

isAllowed

public bool isAllowed ()

Has a user access to the Resource?

line 53

isAuthenticated

public bool isAuthenticated ()

Is this user authenticated?

line 98

isInRole

public bool isInRole (string $role)

Is a user in the specified role?

Input
string $role

line 66

setAuthenticationHandler

public void setAuthenticationHandler ($handler)

Sets authentication handler.

Input
$handler

line 111

setAuthorizationHandler

public void setAuthorizationHandler ($handler)

Sets authorization handler.

Input
$handler

line 79

setNamespace

public void setNamespace (string $namespace)

Changes namespace; allows more users to share a session.

Input
string $namespace

line 47

signOut

public void signOut ([$clearIdentity = FALSE])

Logs off the user from the current session.

Input
$clearIdentity