create new tag
, view all tags
ALERT! NOTE: This is a DistributionDocument. This document is generated, please do not change it. Put questions, error notes, and suggestions concerning the documentation of this topic in the comments section below. Use the Support web for problems you are having using TWiki.

Package TWiki::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 TWiki services.

ObjectMethod fetchPass ($login) -> $passwordE

Implements TWiki::Password

Returns encrypted password if succeeds. Returns 0 if login is invalid. Returns undef otherwise.

ObjectMethod checkPassword ($user,$passwordU) -> $boolean

Finds if the password is valid for the given login.

Returns 1 on success, undef on failure.

ObjectMethod deleteUser ($user) -> $boolean

Delete users entry.

Returns 1 on success, undef on failure.

ObjectMethod passwd ($user,$newPassU,$oldPassU) -> $boolean

If the $oldPassU is undef, it will try to add the user, failing if they are already there.

If the $oldPassU matches matches the login'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.

encrypt( $user, $passwordU, $fresh ) -> $passwordE

Will return an encrypted password. Repeated calls to encrypt with the same user/passU will return the same passE.

However if the passU is changed, and subsequently changed back to the old user/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 getEmails ($user) -> @emails

Fetch the email address(es) for the given username. Default behaviour is to look up the users' personal topic.

ObjectMethod setEmails ($user,@emails)

Set the email address(es) for the given username in the user topic.

Comments & Questions about this Distribution Document Topic

Please use the Support forum if you have questions about TWiki features. This comment section is about the documentation of this topic.
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2006-05-01 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.