Software /
code /
prosody
File
spec/scansion/presence_preapproval.scs @ 12953:ebe3b2f96cad
mod_tokenauth: Switch to new token format (invalidates existing tokens!)
The new format has the following properties:
- 5 bytes longer than the previous format
- The token now has separate 'id' and 'secret' parts - the token itself is no
longer stored in the DB, and the secret part is hashed
- The only variable length field (JID) has been moved to the end
- The 'secret-token:' prefix (RFC 8959) is now included
Compatibility with the old token format was not maintained, and all previously
issued tokens are invalid after this commit (they will be removed from the DB
if used).
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 21 Mar 2023 14:33:29 +0000 |
parent | 10515:35bf3b80480f |
line wrap: on
line source
# server supports contact subscription pre-approval (RFC 6121 3.4) [Client] Alice jid: preappove-a@localhost password: password [Client] Bob jid: preapprove-b@localhost password: password --------- Alice connects Alice sends: <presence/> Alice receives: <presence/> Alice sends: <presence to="${Bob's JID}" type="subscribed"/> Bob connects Bob sends: <iq type="get" id="roster1"> <query xmlns="jabber:iq:roster"/> </iq> Bob receives: <iq type="result" id="roster1"> <query xmlns="jabber:iq:roster" ver="{scansion:any}"> </query> </iq> Bob sends: <presence/> Bob receives: <presence from="${Bob's full JID}"/> Bob sends: <presence to="${Alice's JID}" type="subscribe" /> Bob receives: <iq type='set' id='{scansion:any}'> <query ver='1' xmlns='jabber:iq:roster'> <item jid="${Alice's JID}" subscription='none' ask='subscribe' /> </query> </iq> Bob receives: <presence from="${Alice's JID}" type="subscribed" /> Bob disconnects Alice sends: <iq type="get" id="roster1"> <query xmlns="jabber:iq:roster"/> </iq> Alice receives: <iq type="result" id="roster1"> <query xmlns="jabber:iq:roster" ver="{scansion:any}"> <item jid="${Bob's JID}" subscription="from" /> </query> </iq> Alice disconnects Bob disconnects