Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how do u do cookie sessions or cookies data sending in coap? #409

Open
hiqsociety opened this issue Oct 16, 2022 · 3 comments
Open

how do u do cookie sessions or cookies data sending in coap? #409

hiqsociety opened this issue Oct 16, 2022 · 3 comments
Labels
question Further information is requested

Comments

@hiqsociety
Copy link

how do u do cookie sessions or cookies data sending in coap?

any example on this? pls dont suggest use etag?

@jkralik
Copy link
Member

jkralik commented Oct 17, 2022

It depends on how big the cookie is. If it's a few bytes, you can use option URI-Query (max 255 bytes) with value "cookie=[data]" - all data must be string format. In this case, first you need to transfer the cookie to the server via the body and then the server needs to associate it with the socket. After that, for each request from a client, the server appends stored cookie.

@kolinfluence
Copy link

  1. what if it's not just a few bytes just wondering.
  2. also, what's a good way to do this cookie? since everything is "new", was wondering if there are better options for this cookie thing.

@jkralik
Copy link
Member

jkralik commented Oct 29, 2022

  1. 255 Bytes with keyword
  2. Only if you need to forward cookie: You need to create a session at the server size and associate cookie there. Similar as is mentioned in OCF Specification - Sign in operation via oic/sec/session resource. And after that you will append this cookie to any request from the client to server.

@jkralik jkralik added the question Further information is requested label Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants