Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://wiki.cs.msu.ru/System/PerlDoc?module=Foswiki::Users::Password
Дата изменения: Unknown Дата индексирования: Mon Apr 11 15:11:49 2016 Кодировка: koi8-r |
public package
Foswiki::Users::Password public package
Foswiki::Users::Password Base class of all password handlers. Default behaviour is no passwords, so anyone can be anyone they like.
The methods of this class should be overridded by subclasses that want to implement other password handling methods.
ClassMethod
new( $session ) → $object Constructs a new password handler of this type, referring to $session for any required Foswiki services.
ObjectMethod
finish() ObjectMethod
readOnly( ) → boolean ObjectMethod
fetchPass( $login ) → $passwordE Returns encrypted password if succeeds. Returns 0 if login is invalid. Returns undef otherwise.
ObjectMethod
checkPassword( $login, $passwordU ) → $boolean Finds if the password is valid for the given user.
Returns 1 on success, undef on failure.
ObjectMethod
removeUser( $login ) → $boolean Delete the users entry.
ObjectMethod
setPassword( $login, $newPassU, $oldPassU ) → $boolean If the $oldPassU matches matches the user's password, then it will replace it with $newPassU.
If $oldPassU is not correct and not 1, will return 0.
If $oldPassU is 1, will force the change irrespective of the existing password, adding the user if necessary.
Otherwise returns 1 on success, undef on failure.
Will return an encrypted password. Repeated calls to encrypt with the same login/passU will return the same passE.
However if the passU is changed, and subsequently changed back to the old login/passU pair, then the old passE is no longer valid.If $fresh is true, then a new password not based on any pre-existing salt will be used. Set this if you are generating a completely new password.
ObjectMethod
error() → $string Return any error raised by the last method call, or undef if the last method call succeeded.
ObjectMethod
isManagingEmails() → $boolean ObjectMethod
getEmails($login) → @emails isManagingEmails
-> true
.
ObjectMethod
setEmails($login, @emails) → $boolean isManagingEmails
-> true
.
ObjectMethod
findUserByEmail($email) → \@users isManagingEmails
-> true
.
Called by Users.pm.
ObjectMethod
canFetchUsers() → boolean returns true if the fetchUsers method is implemented and can return an iterator of users. returns undef / nothing in this case, as we are unable to generate a list of users
ObjectMethod
fetchUsers() → $iterator