mod_delegation/README.markdown
changeset 2763 4bf60727459b
parent 1997 66aaf7c3cb29
child 2880 ea6b5321db50
equal deleted inserted replaced
2762:82109d8eca41 2763:4bf60727459b
     1 ---
     1 ---
     2 labels:
     2 labels:
     3 - 'Stage-Alpha'
     3 - 'Stage-Beta'
     4 summary: 'XEP-0355 (Namespace Delegation) implementation'
     4 summary: 'XEP-0355 (Namespace Delegation) implementation'
     5 ...
     5 ...
     6 
     6 
     7 Introduction
     7 Introduction
     8 ============
     8 ============
    27 modules\_enabled. Note that if you use it with a local component, you
    27 modules\_enabled. Note that if you use it with a local component, you
    28 also need to activate the module in your component section:
    28 also need to activate the module in your component section:
    29 
    29 
    30     modules_enabled = {
    30     modules_enabled = {
    31             [...]
    31             [...]
    32         
    32 
    33             "delegation";
    33             "delegation";
    34     }
    34     }
    35 
    35 
    36     [...]
    36     [...]
    37 
    37 
    56 Here all MAM requests with a "node" attribute (i.e. all MAM pubsub
    56 Here all MAM requests with a "node" attribute (i.e. all MAM pubsub
    57 request) will be delegated to pubsub.yourdomain.tld. Similarly, all
    57 request) will be delegated to pubsub.yourdomain.tld. Similarly, all
    58 pubsub request to the host (i.e. the PEP requests) will be delegated to
    58 pubsub request to the host (i.e. the PEP requests) will be delegated to
    59 pubsub.yourdomain.tld.
    59 pubsub.yourdomain.tld.
    60 
    60 
    61 **/! Be extra careful when you give a delegation to an entity/component,
    61 **/!\ Be extra careful when you give a delegation to an entity/component,
    62 it's a powerful access, only do it if you absoly trust the
    62 it's a powerful access, only do it if you absoly trust the
    63 component/entity, and you know where the software is coming from**
    63 component/entity, and you know where the software is coming from**
    64 
    64 
    65 Configuration
    65 Configuration
    66 =============
    66 =============
    73 
    73 
    74 If your are not a developper, the delegated namespace(s)/attribute(s)
    74 If your are not a developper, the delegated namespace(s)/attribute(s)
    75 are most probably specified with the external component/entity you want
    75 are most probably specified with the external component/entity you want
    76 to use.
    76 to use.
    77 
    77 
       
    78 The pseudo-namespace `http://jabber.org/protocol/disco#items:*` is used
       
    79 to delegate remaining disco#items (i.e. items nodes not already handled
       
    80 by Prosody itself).
       
    81 
    78 Compatibility
    82 Compatibility
    79 =============
    83 =============
    80 
    84 
    81 If you use it with Prosody 0.9 and a component, you need to patch
    85 If you use it with Prosody 0.9 and a component, you need to patch
    82 core/mod\_component.lua to fire a new signal. To do it, copy the
    86 core/mod\_component.lua to fire a new signal. To do it, copy the
    88     @@ -85,6 +85,7 @@
    92     @@ -85,6 +85,7 @@
    89                     session.type = "component";
    93                     session.type = "component";
    90                     module:log("info", "External component successfully authenticated");
    94                     module:log("info", "External component successfully authenticated");
    91                     session.send(st.stanza("handshake"));
    95                     session.send(st.stanza("handshake"));
    92     +               module:fire_event("component-authenticated", { session = session });
    96     +               module:fire_event("component-authenticated", { session = session });
    93      
    97 
    94                     return true;
    98                     return true;
    95             end
    99             end
    96 
   100 
    97 Then, at the root of prosody, enter:
   101 Then, at the root of prosody, enter:
    98 
   102