Interface IUser (namespace Nette\Web)
User authentication and authorization.
Public Method Summary | |
---|---|
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 |
isInRole
(string $role)
Is a user in the specified role?
|
bool |
isLoggedIn
()
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 |
setAuthenticationHandler
($handler)
Sets authentication handler.
|
void |
setAuthorizationHandler
($handler)
Sets authorization handler.
|
void |
setNamespace
(string $namespace)
Changes namespace; allows more users to share a session.
|
Method Details | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 63 getAuthenticationHandlerpublic IAuthenticator getAuthenticationHandler () Returns authentication handler. |
||||||||||||||||||||||||
line 108 getAuthorizationHandlerpublic IAuthorizator getAuthorizationHandler () Returns current authorization handler. |
||||||||||||||||||||||||
line 50 getIdentitypublic IIdentity getIdentity () Returns current user identity, if any. |
||||||||||||||||||||||||
line 76 getNamespacepublic string getNamespace () Returns current namespace. |
||||||||||||||||||||||||
line 82 getRolespublic array getRoles () Returns a list of roles that a user has been granted. |
||||||||||||||||||||||||
line 95 isAllowedpublic bool isAllowed () Has a user access to the Resource? |
||||||||||||||||||||||||
line 89 isInRolepublic bool isInRole (string $role) Is a user in the specified role?
|
||||||||||||||||||||||||
line 44 isLoggedInpublic bool isLoggedIn () Is this user authenticated? |
||||||||||||||||||||||||
line 32 loginpublic void login (string $username, string $password, [mixed $extra = Conducts the authentication process.
|
||||||||||||||||||||||||
line 38 logoutpublic void logout ([$clearIdentity = Logs out the user from the current session.
|
||||||||||||||||||||||||
line 57 setAuthenticationHandlerpublic void setAuthenticationHandler ($handler) Sets authentication handler.
|
||||||||||||||||||||||||
line 102 setAuthorizationHandlerpublic void setAuthorizationHandler ($handler) Sets authorization handler.
|
||||||||||||||||||||||||
line 70 setNamespacepublic void setNamespace (string $namespace) Changes namespace; allows more users to share a session.
|