Package org.jivesoftware.openfire.session

Examples of org.jivesoftware.openfire.session.Session


      throw new Exception("Not yet implemented for remote sessions");
    }
  }
 
  private boolean validateLocalSession(String jid, String signature) {
    Session session = sessionManager.getSession(new JID(jid));
   
    // Does a valid session exist ?
    if (session == null || !session.validate()) {
      return false;
    }
   
    // Is the session authenticated ?
    if (session.getStatus() != Session.STATUS_AUTHENTICATED) {
      return false;
    }

    // Is the provided signature correct ?
    // TODO the signature should be a hash of stuff...
    String streamID = session.getStreamID().getID();
    System.out.println("Validating signature " + signature + " against ID " + streamID);
    if (!streamID.equals(signature)) {
      return false;
    }
   
View Full Code Here


    public void interceptFileTransfer(FileTransfer fileTransfer, boolean isReady) throws FileTransferRejectedException {
        XMPPServer server = XMPPServer.getInstance();
       
        JID initiator = new JID(fileTransfer.getInitiator());
        JID receiver = new JID(fileTransfer.getTarget());
        Session initiatorSession = server.getSessionManager().getSession(initiator);
        Session receiverSession = server.getSessionManager().getSession(receiver);
       
        // initial request initiated locally from an HTTP session
        if( !isReady
                && server.isLocal( initiator )
                && initiatorSession != null
View Full Code Here

TOP

Related Classes of org.jivesoftware.openfire.session.Session

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.