| Home | Trees | Indices | Help |
|
|---|
|
|
The confirmation engine is what does the work of sending a confirmation, and verifying that it was confirmed properly. In order to use it you have to construct the ConfirmationEngine (usually in config/settings.py) and you write your confirmation message templates for sending.
The primary methods you use are ConfirmationEngine.send and ConfirmationEngine.verify.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
The pending_queue should be a string with the path to the lamson.queue.Queue that will store pending messages. These messages are the originals the user sent when they tried to confirm. Storage should be something that is like ConfirmationStorage so that this can store things for later verification.
|
Returns the pending message for the given ID. |
Puts a pending message into the pending queue. |
Removes the pending message from the pending queue. |
Used to cancel a pending confirmation. |
Generates a random uuid as the secret, in hex form. |
Don't call this directly unless you know what you are doing. It does the job of registering the original message and the expected confirmation into the storage. |
Given a target (i.e. "subscribe", "post", etc), a from_address of someone trying to confirm, and the secret they should use, this will try to verify their confirmation. If the verify works then you'll get the original message back to do what you want with. If the verification fails then you are given None. The message is *not* deleted from the pending queue. You can do that yourself with delete_pending. |
This is the method you should use to send out confirmation messages. You give it the relay, a target (i.e. "subscribe"), the message they sent requesting the confirm, your confirmation template, and any vars that template needs. The result of calling this is that the template message gets sent through the relay, the original message is stored in the pending queue, and data is put into the storage for later calls to verify. |
Used in testing to make sure there's nothing in the pending queue or storage. |
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Wed Jul 7 07:32:51 2010 | http://epydoc.sourceforge.net |