GithubHelp home page GithubHelp logo

Login, passcode about stompclientlib HOT 6 CLOSED

wrathchaos avatar wrathchaos commented on July 17, 2024
Login, passcode

from stompclientlib.

Comments (6)

igormagurean avatar igormagurean commented on July 17, 2024 1

My problem was that I was sending "login,passcode,accept-version" in header, this is wrong, to CONNECT via STOMP it's a simple String.

let connectFrame = "CONNECT\n
                                   login:admin\n
                                   passcode:password\n\n\n\0"

```We just need to write socket.write(string: connectFrame)

from stompclientlib.

michaelpeternell avatar michaelpeternell commented on July 17, 2024 1

using username and password for login purposes is an essential feature. It would enhance the usefulness of this library much if it were documented somewhere. Not everyone will do a comprehensive search of open and closed issues just to find this feature.

from stompclientlib.

WrathChaos avatar WrathChaos commented on July 17, 2024

Hello @blinkmeoff,
Why are you trying to use a websocket just for login ?
Is there a must logic behind it?

You can use socket.send() method however I do not recommend that because you need to handle everything for yourself. Therefore, you do not need this library if you want to do that, you can simply use Facebook's Websocket and handle it on your own:

from stompclientlib.

igormagurean avatar igormagurean commented on July 17, 2024

STOMP 1.2 clients MUST set the following headers:

accept-version : The versions of the STOMP protocol the client supports. See Protocol Negotiation for more details.
host : The name of a virtual host that the client wishes to connect to. It is recommended clients set this to the host name that the socket was established against, or to any name of their choosing. If this header does not match a known virtual host, servers supporting virtual hosting MAY select a default virtual host or reject the connection.

STOMP 1.2 clients MAY set the following headers:

login : The user identifier used to authenticate against a secured STOMP server.
passcode : The password used to authenticate against a secured STOMP server.
heart-beat : The Heart-beating settings.

from stompclientlib.

WrathChaos avatar WrathChaos commented on July 17, 2024

At the end @blinkmeoff's business logic is fixed and it works :)
Closed <3

from stompclientlib.

WrathChaos avatar WrathChaos commented on July 17, 2024

I will add an example on the README :) Thank you for the suggestion @michaelpeternell

from stompclientlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.