Interface IUser (namespace Nette\Web)
Authentication and authorization.
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 |
getIdentity
()
Returns current user identity, if any.
|
string |
getNamespace
()
Returns current namespace.
|
array |
getRoles
()
Returns a list of roles that a user has been granted.
|
bool |
isAllowed
()
Has a user access to the Resource?
|
bool |
Is this user authenticated?
|
bool |
isInRole
(string $role)
Is a user in the specified role?
|
void |
setAuthenticationHandler
($handler)
Sets authentication handler.
|
void |
setAuthorizationHandler
($handler)
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 40 authenticatepublic void authenticate (string $username, string $password, [mixed $extra = Conducts the authentication process.
|
||||||||||||||||||||||||
line 71 getAuthenticationHandlerpublic IAuthenticator getAuthenticationHandler () Returns authentication handler. |
||||||||||||||||||||||||
line 116 getAuthorizationHandlerpublic IAuthorizator getAuthorizationHandler () Returns current authorization handler. |
||||||||||||||||||||||||
line 58 getIdentitypublic IIdentity getIdentity () Returns current user identity, if any. |
||||||||||||||||||||||||
line 84 getNamespacepublic string getNamespace () Returns current namespace. |
||||||||||||||||||||||||
line 90 getRolespublic array getRoles () Returns a list of roles that a user has been granted. |
||||||||||||||||||||||||
line 103 isAllowedpublic bool isAllowed () Has a user access to the Resource? |
||||||||||||||||||||||||
line 52 isAuthenticatedpublic bool isAuthenticated () Is this user authenticated? |
||||||||||||||||||||||||
line 97 isInRolepublic bool isInRole (string $role) Is a user in the specified role?
|
||||||||||||||||||||||||
line 65 setAuthenticationHandlerpublic void setAuthenticationHandler ($handler) Sets authentication handler.
|
||||||||||||||||||||||||
line 110 setAuthorizationHandlerpublic void setAuthorizationHandler ($handler) Sets authorization handler.
|
||||||||||||||||||||||||
line 78 setNamespacepublic void setNamespace (string $namespace) Changes namespace; allows more users to share a session.
|
||||||||||||||||||||||||
line 46 signOutpublic void signOut ([$clearIdentity = Logs off the user from the current session.
|