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 41 authenticatepublic void authenticate (string $username, string $password, [mixed $extra = Conducts the authentication process.
|
||||||||||||||||||||||||
|
line 72 getAuthenticationHandlerpublic IAuthenticator getAuthenticationHandler () Returns authentication handler. |
||||||||||||||||||||||||
|
line 117 getAuthorizationHandlerpublic IAuthorizator getAuthorizationHandler () Returns current authorization handler. |
||||||||||||||||||||||||
|
line 59 getIdentitypublic IIdentity getIdentity () Returns current user identity, if any. |
||||||||||||||||||||||||
|
line 85 getNamespacepublic string getNamespace () Returns current namespace. |
||||||||||||||||||||||||
|
line 91 getRolespublic array getRoles () Returns a list of roles that a user has been granted. |
||||||||||||||||||||||||
|
line 104 isAllowedpublic bool isAllowed () Has a user access to the Resource? |
||||||||||||||||||||||||
|
line 53 isAuthenticatedpublic bool isAuthenticated () Is this user authenticated? |
||||||||||||||||||||||||
|
line 98 isInRolepublic bool isInRole (string $role) Is a user in the specified role?
|
||||||||||||||||||||||||
|
line 66 setAuthenticationHandlerpublic void setAuthenticationHandler ($handler) Sets authentication handler.
|
||||||||||||||||||||||||
|
line 111 setAuthorizationHandlerpublic void setAuthorizationHandler ($handler) Sets authorization handler.
|
||||||||||||||||||||||||
|
line 79 setNamespacepublic void setNamespace (string $namespace) Changes namespace; allows more users to share a session.
|
||||||||||||||||||||||||
|
line 47 signOutpublic void signOut ([$clearIdentity = Logs off the user from the current session.
|
||||||||||||||||||||||||
