Examples of Challenge


Examples of com.sissi.protocol.iq.auth.Challenge

  }

  @Override
  public boolean auth(Auth auth, JIDContext context) {
    try {
      context.write(new Challenge(this.saslServers.push(context, Sasl.createSaslServer(mechanism, this.protocol, context.domain(), this.props, new ServerCallbackHandler(context))).evaluateResponse(new byte[0])));
      return true;
    } catch (Exception e) {
      this.log.error(e.toString());
      Trace.trace(this.log, e);
      return false;
View Full Code Here

Examples of com.soashable.robotolympics.challenge.Challenge

        challengeMap.get(key).getPackets().add(packet);
    }

    public Packet createChallenge(Packet packet, Session session) {
        String challengeId = makeChallengeId(packet);
        Challenge challenge = challengeGenerator.nextChallenge();
        String question = challenge.getChallenge();
       

        ChallengeExtension challengeExt = new ChallengeExtension();
        challengeExt.setFrom(packet.getTo().toString());
        challengeExt.setChallengeId(challengeId);
View Full Code Here

Examples of com.soashable.robotolympics.challenge.Challenge

    public void testCreateChallenge() {
        Packet challengePacket = challengeManager.createChallenge(message, session);
        String packetBody = ((Message)challengePacket).getBody();
       
        String challengeId = challengeManager.makeChallengeId(message);
        Challenge challenge = challengeManager.getChallenge( message );
        String challengeString = challenge.getChallenge();
       
        assertEquals( "The chalenge must come from the original recipient", message.getTo(), challengePacket.getFrom() );
       
        assertNotNull( "Challenge does not have extension", challengePacket.getExtension( ChallengeExtension.ELEMENT_NAME, ChallengeExtension.NAMESPACE ) );
       
View Full Code Here

Examples of ietf.params.xml.ns.xmpp_sasl.Challenge

        if (LOG.isDebugEnabled()) {
            LOG.debug("Auth mechanism: " + auth.getMechanism() + " value: " + auth.getValue());
        }
        String value = createChallengeValue(auth);
        if (value != null) {
            Challenge challenge = new Challenge();
            challenge.setValue(value);
            transport.marshall(challenge);
        } else {
            transport.marshall(new Success());
        }
    }
View Full Code Here

Examples of ietf.params.xml.ns.xmpp_sasl.Challenge

        if (log.isDebugEnabled()) {
            log.debug("Auth mechanism: " + auth.getMechanism() + " value: " + auth.getValue());
        }
        String value = createChallengeValue(auth);
        if (value != null) {
            Challenge challenge = new Challenge();
            challenge.setValue(value);
            transport.marshall(challenge);
        }
        else {
            transport.marshall(new Success());
        }
View Full Code Here

Examples of ietf.params.xml.ns.xmpp_sasl.Challenge

        if (LOG.isDebugEnabled()) {
            LOG.debug("Auth mechanism: " + auth.getMechanism() + " value: " + auth.getValue());
        }
        String value = createChallengeValue(auth);
        if (value != null) {
            Challenge challenge = new Challenge();
            challenge.setValue(value);
            transport.marshall(challenge);
        } else {
            transport.marshall(new Success());
        }
    }
View Full Code Here

Examples of ietf.params.xml.ns.xmpp_sasl.Challenge

        if (LOG.isDebugEnabled()) {
            LOG.debug("Auth mechanism: " + auth.getMechanism() + " value: " + auth.getValue());
        }
        String value = createChallengeValue(auth);
        if (value != null) {
            Challenge challenge = new Challenge();
            challenge.setValue(value);
            transport.marshall(challenge);
        } else {
            transport.marshall(new Success());
        }
    }
View Full Code Here

Examples of org.jivesoftware.smack.sasl.SASLMechanism.Challenge

                        }
                    }
                    else if (parser.getName().equals("challenge")) {
                        // The server is challenging the SASL authentication made by the client
                        String challengeData = parser.nextText();
                        processPacket(new Challenge(challengeData));
                        connection.getSASLAuthentication().challengeReceived(challengeData);
                    }
                    else if (parser.getName().equals("success")) {
                        processPacket(new Success(parser.nextText()));
                        // We now need to bind a resource for the connection
View Full Code Here

Examples of org.jivesoftware.smack.sasl.SASLMechanism.Challenge

                        }
                    }
                    else if (parser.getName().equals("challenge")) {
                        // The server is challenging the SASL authentication made by the client
                        String challengeData = parser.nextText();
                        processPacket(new Challenge(challengeData));
                        connection.getSASLAuthentication().challengeReceived(challengeData);
                    }
                    else if (parser.getName().equals("success")) {
                        processPacket(new Success(parser.nextText()));
                        // We now need to bind a resource for the connection
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.