Hi Hunter,
Replied to you on IRC.
It’s unclear what the actual problem is. You’re describing the solution you tried, but not what you experienced and what you’re trying to solve.
So, what’s the original issue?
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Rich,
Thanks for the extra details.
We could definitely use better error handling (and we’re working on that, I promise).
It does indeed sound like a CORS issue, but let’s verify that’s the issue first.
Can you open your browser’s web console, switch to the network tab, and then execute the call?
Following what you see there, we can (hopefully) proceed.
From: "Morrisey, Richard" <Richard....@capitalone.com>
Date: Wednesday, 18 January 2017 at 12:53
To: Ron Ratovsky <Ron.Ra...@smartbear.com>, "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Cc: "Morgan, Hunter" <Hunter...@capitalone.com>
Subject: Re: cors/authentication headers
Ron,
I originally had this issue. I installed swagger-editor 20.10.4 on osx 10.11.6 (my laptop), from github using the online documentation.
I have a request that requires basic authentication.
My security section looks like:
securityDefinitions:
userSecurity:
type: basic
description: HTTP Basic Authentication. Works over `HTTP` and `HTTPS`
My path looks like:
/v2/data/clusters:
get:
security:
- userSecurity: []
description: |
Returns a list of provisioned clusters
responses:
200:
description: Cluster JSON
I enter my credentials in the rendered control panel and get a green checkmark. I click ‘Try this Operation’ on the indicated path, then ‘send request’. Then I see ‘ERROR Server not found or an error occurred’. (‘or an error occurred’ seems to wipe out the specificity of ‘Server not found’). I’m pretty sure the server is being resolved in an earlier path/request that does not need basic auth, there is no problem getting to the server. However, I do note that there is no ‘Authorization:’ header in the request for this path even though I am specifying security.
We also have a warning about CORS. This may be a red-herring.
Thanks for any help.
Rich
The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates and may only be used solely in performance of work or services for Capital One. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.
Hi Rich,
So yeah, that is an indicator of a CORS issue, but it could be something slightly else.
You’re getting 401 Unauthorized on OPTIONS – and you shouldn’t OPTIONS calls should never require authorization.
That could be a hint as to what to look into.
From: "Morrisey, Richard" <Richard....@capitalone.com>
Date: Thursday, 19 January 2017 at 7:46
To: Ron Ratovsky <Ron.Ra...@smartbear.com>, "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Cc: "Morgan, Hunter" <Hunter...@capitalone.com>
Subject: Re: cors/authentication headers
Sorry Ron, I am working on old fashioned email time rather than IM L See the screen capture below. I don’t believe I am exposing any sensitive info.
See screenshot
I already had that open.