/**
         * <summary>
         * Wraps authentication request into a protocol message.</summary>
         *
         * <param name="req">Authentication request that need to be wrapped.</param>
         * <returns>Wrapped message.</returns>
         */
        private static ProtoRequest WrapAuthRequest(GridClientAuthenticationRequest req)
        {
            ProtoAuthenticationRequest.Builder builder = ProtoAuthenticationRequest.CreateBuilder()
                                                         .SetCredentials(WrapObject(req.Credentials));

            return(WrapRequest(req, builder.Build()));
        }
        /**
         * <summary>
         * Wraps authentication request into a protocol message.</summary>
         *
         * <param name="req">Authentication request that need to be wrapped.</param>
         * <returns>Wrapped message.</returns>
         */
        private static GridClientAuthenticationRequest WrapAuthRequest(ProtoRequest req)
        {
            var data = ProtoAuthenticationRequest.ParseFrom(req.Body);
            var bean = new GridClientAuthenticationRequest(Guid.Empty);

            bean.Credentials = WrapObject(data.Credentials);

            return(WrapRequest(bean, req));
        }
Exemplo n.º 3
0
        /**
         * <summary>
         * Sends credentials to the remote server.</summary>
         */
        private void sendCredentials(long reqId)
        {
            GridClientAuthenticationRequest req = new GridClientAuthenticationRequest(Guid.Empty);

            req.Credentials = Credentials;
            req.RequestId   = reqId;
            req.ClientId    = ClientId;

            sendPacket(req);
        }