Package org.apache.vysper.xmpp.modules.extension.xep0220_server_dailback

Examples of org.apache.vysper.xmpp.modules.extension.xep0220_server_dailback.DialbackIdGenerator


    private Entity receiving = EntityImpl.parseUnchecked("xmpp.example.com");
    private Entity originating = EntityImpl.parseUnchecked("example.org");
    private String streamId = "D60000229F";
   
    public void testId() {
        DialbackIdGenerator generator = new DialbackIdGenerator();
        String id = generator.generate(receiving, originating, streamId);
       
        Assert.assertTrue(generator.verify(id, receiving, originating, streamId));
       
    }
View Full Code Here


        Assert.assertTrue(generator.verify(id, receiving, originating, streamId));
       
    }

    public void testNotValidId() {
        DialbackIdGenerator generator = new DialbackIdGenerator();
        Assert.assertFalse(generator.verify("1234567890", receiving, originating, streamId));
    }
View Full Code Here

               
                return new ResponseStanzaContainerImpl(startTlsStanza);
            } else if(dialbackSupported(stanza)) {
                Entity originating = serverRuntimeContext.getServerEnitity();

                String dailbackId = new DialbackIdGenerator().generate(otherServer, originating, sessionContext.getSessionId());
               
                Stanza dbResult = new StanzaBuilder("result", NamespaceURIs.JABBER_SERVER_DIALBACK, "db")
                    .addAttribute("from", originating.getDomain())
                    .addAttribute("to", otherServer.getDomain())
                    .addText(dailbackId)
View Full Code Here

                    sessionContext.setInitiatingEntity(otherServer);
                   
                    String version = stanza.getAttributeValue("version");
                    if(version == null) {
                        // old protocol, assume dialback
                        String dailbackId = new DialbackIdGenerator().generate(otherServer, serverRuntimeContext.getServerEnitity(), sessionContext.getSessionId());
                       
                        Stanza dbResult = new StanzaBuilder("result", NamespaceURIs.JABBER_SERVER_DIALBACK, "db")
                            .addAttribute("from", serverRuntimeContext.getServerEnitity().getDomain())
                            .addAttribute("to", otherServer.getDomain())
                            .addText(dailbackId)
View Full Code Here

TOP

Related Classes of org.apache.vysper.xmpp.modules.extension.xep0220_server_dailback.DialbackIdGenerator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.