Package com.corundumstudio.socketio.messages

Examples of com.corundumstudio.socketio.messages.AuthorizeMessage


        String jsonpParam = null;
        if (jsonpParams != null) {
            jsonpParam = jsonpParams.get(0);
        }

        channel.write(new AuthorizeMessage(msg, jsonpParam, origin, sessionId));
        log.debug("New sessionId: {} authorized", sessionId);
    }
View Full Code Here


        String jsonpParam = null;
        if (jsonpParams != null) {
            jsonpParam = jsonpParams.get(0);
        }

        channel.write(new AuthorizeMessage(msg, jsonpParam, origin, sessionId));
        log.debug("New sessionId: {} authorized", sessionId);
    }
View Full Code Here

    private HttpResponse createHttpResponse(HttpMessage msg, ByteBuf message) {
        HttpResponse res = new DefaultHttpResponse(HTTP_1_1, HttpResponseStatus.OK);

        if (msg instanceof AuthorizeMessage) {
            AuthorizeMessage am = (AuthorizeMessage) msg;
            if (am.getJsonpParam() != null) {
                HttpHeaders.addHeader(res, CONTENT_TYPE, "application/javascript");
            } else {
                HttpHeaders.addHeader(res, CONTENT_TYPE, "text/plain; charset=UTF-8");
            }
        } else {
View Full Code Here

            List<String> jsonpParams = params.get("jsonp");
            String jsonpParam = null;
            if (jsonpParams != null) {
                jsonpParam = jsonpParams.get(0);
            }
            channel.write(new AuthorizeMessage(msg, jsonpParam, origin, sessionId));

            authorizedSessionIds.put(sessionId, data);
            log.debug("Handshake authorized for sessionId: {}", sessionId);
        } else {
            HttpResponse res = new DefaultHttpResponse(HTTP_1_1, HttpResponseStatus.FORBIDDEN);
View Full Code Here

            List<String> jsonpParams = params.get("jsonp");
            String jsonpParam = null;
            if (jsonpParams != null) {
                jsonpParam = jsonpParams.get(0);
            }
            channel.write(new AuthorizeMessage(msg, jsonpParam, origin, sessionId));

            handshake(sessionId);
            HandshakeMessage message = new HandshakeMessage(sessionId);
            configuration.getStoreFactory().getPubSubStore().publish(PubSubStore.HANDSHAKE, message);
            log.debug("Handshake authorized for sessionId: {}", sessionId);
View Full Code Here

        String jsonpParam = null;
        if (jsonpParams != null) {
            jsonpParam = jsonpParams.get(0);
        }

        channel.write(new AuthorizeMessage(msg, jsonpParam, origin, sessionId));
        log.debug("New sessionId: {} authorized", sessionId);
    }
View Full Code Here

            List<String> jsonpParams = params.get("jsonp");
            String jsonpParam = null;
            if (jsonpParams != null) {
                jsonpParam = jsonpParams.get(0);
            }
            channel.writeAndFlush(new AuthorizeMessage(msg, jsonpParam, origin, sessionId));

            authorizedSessionIds.put(sessionId, data);
            log.debug("Handshake authorized for sessionId: {}", sessionId);
        } else {
            HttpResponse res = new DefaultHttpResponse(HTTP_1_1, HttpResponseStatus.UNAUTHORIZED);
View Full Code Here

    private HttpResponse createHttpResponse(HttpMessage msg, ByteBuf message) {
        HttpResponse res = new DefaultHttpResponse(HTTP_1_1, HttpResponseStatus.OK);

        if (msg instanceof AuthorizeMessage) {
            AuthorizeMessage am = (AuthorizeMessage) msg;
            if (am.getJsonpParam() != null) {
                HttpHeaders.addHeader(res, CONTENT_TYPE, "application/javascript");
            } else {
                HttpHeaders.addHeader(res, CONTENT_TYPE, "text/plain; charset=UTF-8");
            }
        } else {
View Full Code Here

        String jsonpParam = null;
        if (jsonpParams != null) {
            jsonpParam = jsonpParams.get(0);
        }

        channel.write(new AuthorizeMessage(msg, jsonpParam, origin, sessionId));
        log.debug("New sessionId: {} authorized", sessionId);
    }
View Full Code Here

TOP

Related Classes of com.corundumstudio.socketio.messages.AuthorizeMessage

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.