ACI & Websocket - Didn't switch protocols?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2017 04:16 AM
Hello,
I am trying to open a websocket connection to APIC Controller that results into an exception with "Didn't switch protocols". I am using Jetty implementation for Java websocket.
The websocket URL is of the form "wss://<URL>/socket<APIC-Cookie>"
This result is observed if I had received APIC-Cookie along with APIC-Challenge during login request i.e., usage of "?gui-token-request=yes". The websocket connection succeeds if APIC-Challenge was not requested but as you know subscriptions requests require APIC-Challenge to be specified.
Any experiences ?
Thanks,
-Harish Kamath.
- Labels:
-
APIC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2021 08:18 AM - edited 04-10-2021 08:19 AM
I have run into what appears to be the same issue: if I call api/aaaLogin.json including the gui-token-request=yes parameter, I can no longer open a WebSocket connection (I receive a 404 error instead of the 101 success response code).
Is there a way to pass the APIC-challenge when creating the WebSocket or do I have to remove the gui-token-request=yes parameter to aaaLogin?
(This is an external application, so I assume api/requestAppToken.json is not an option.)
