Skip to content

Authorization not being sent through headers #3499

@codercatdev

Description

@codercatdev

When reporting an issue, please provide the following details:

  • swagger-ui version
    "swagger-ui-dist": "^3.0.21"
  • a swagger file reproducing the issue
{"swagger":"2.0","host":"nahollap780.na.haworthinc.com/bec","produces":["application/json"],"basePath":"/sap/opu/odata/sap/ZGW0001V1_TECHNICAL_SRV","info":{"title":"OData Service","version":"0.0.1","x-odata-version":"1.0"},"paths":{"/backendSystemSet":{"get":{"operationId":"getbackendSystemSet","parameters":[{"name":"$filter","type":"string","required":false,"in":"query"},{"name":"$top","type":"integer","required":false,"in":"query"},{"name":"$skip","type":"integer","required":false,"in":"query"},{"name":"$orderby","type":"string","required":false,"in":"query"},{"name":"$expand","type":"string","required":false,"in":"query"},{"name":"$inlinecount","type":"string","required":false,"in":"query"}],"responses":{"200":{"description":"List of backendSystem","schema":{"type":"object","properties":{"value":{"type":"array","items":{"$ref":"#/definitions/ZGW0001V1_TECHNICAL_SRV.backendSystem"}}}}},"default":{"description":"Unexpected error","schema":{"$ref":"#/definitions/Error"}}}},"post":{"operationId":"createbackendSystem","parameters":[{"name":"backendSystem","in":"body","required":true,"schema":{"$ref":"#/definitions/ZGW0001V1_TECHNICAL_SRV.backendSystem"}}],"responses":{"201":{"description":"Created entity","schema":{"$ref":"#/definitions/ZGW0001V1_TECHNICAL_SRV.backendSystem"}},"default":{"description":"Unexpected error","schema":{"$ref":"#/definitions/Error"}}}}},"/backendSystemSet('{id}')":{"get":{"operationId":"getbackendSystemById","parameters":[{"name":"id","required":true,"in":"path","type":"string"}],"responses":{"200":{"description":"A backendSystem.","schema":{"$ref":"#/definitions/ZGW0001V1_TECHNICAL_SRV.backendSystem"}},"default":{"description":"Unexpected error","schema":{"$ref":"#/definitions/Error"}}}},"delete":{"operationId":"deletebackendSystem","parameters":[{"name":"id","required":true,"in":"path","type":"string"}],"responses":{"204":{"description":"Empty response."},"default":{"description":"Unexpected error","schema":{"$ref":"#/definitions/Error"}}}},"patch":{"operationId":"updatebackendSystem","parameters":[{"name":"id","required":true,"in":"path","type":"string"},{"name":"backendSystem","in":"body","required":true,"schema":{"$ref":"#/definitions/ZGW0001V1_TECHNICAL_SRV.backendSystem"}}],"responses":{"200":{"description":"A backendSystem.","schema":{"$ref":"#/definitions/ZGW0001V1_TECHNICAL_SRV.backendSystem"}},"204":{"description":"Empty response."},"default":{"description":"Unexpected error","schema":{"$ref":"#/definitions/Error"}}}}},"/userNameSet":{"get":{"operationId":"getuserNameSet","parameters":[{"name":"$filter","type":"string","required":false,"in":"query"},{"name":"$top","type":"integer","required":false,"in":"query"},{"name":"$skip","type":"integer","required":false,"in":"query"},{"name":"$orderby","type":"string","required":false,"in":"query"},{"name":"$expand","type":"string","required":false,"in":"query"},{"name":"$inlinecount","type":"string","required":false,"in":"query"}],"responses":{"200":{"description":"List of userName","schema":{"type":"object","properties":{"value":{"type":"array","items":{"$ref":"#/definitions/ZGW0001V1_TECHNICAL_SRV.userName"}}}}},"default":{"description":"Unexpected error","schema":{"$ref":"#/definitions/Error"}}}},"post":{"operationId":"createuserName","parameters":[{"name":"userName","in":"body","required":true,"schema":{"$ref":"#/definitions/ZGW0001V1_TECHNICAL_SRV.userName"}}],"responses":{"201":{"description":"Created entity","schema":{"$ref":"#/definitions/ZGW0001V1_TECHNICAL_SRV.userName"}},"default":{"description":"Unexpected error","schema":{"$ref":"#/definitions/Error"}}}}},"/userNameSet('{Bname}')":{"get":{"operationId":"getuserNameById","parameters":[{"name":"Bname","required":true,"in":"path","type":"string"}],"responses":{"200":{"description":"A userName.","schema":{"$ref":"#/definitions/ZGW0001V1_TECHNICAL_SRV.userName"}},"default":{"description":"Unexpected error","schema":{"$ref":"#/definitions/Error"}}}},"delete":{"operationId":"deleteuserName","parameters":[{"name":"Bname","required":true,"in":"path","type":"string"}],"responses":{"204":{"description":"Empty response."},"default":{"description":"Unexpected error","schema":{"$ref":"#/definitions/Error"}}}},"patch":{"operationId":"updateuserName","parameters":[{"name":"Bname","required":true,"in":"path","type":"string"},{"name":"userName","in":"body","required":true,"schema":{"$ref":"#/definitions/ZGW0001V1_TECHNICAL_SRV.userName"}}],"responses":{"200":{"description":"A userName.","schema":{"$ref":"#/definitions/ZGW0001V1_TECHNICAL_SRV.userName"}},"204":{"description":"Empty response."},"default":{"description":"Unexpected error","schema":{"$ref":"#/definitions/Error"}}}}}},"definitions":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"ZGW0001V1_TECHNICAL_SRV.backendSystem":{"type":"object","properties":{"id":{"type":"string"},"client":{"type":"string"},"operatingSystem":{"type":"string"},"database":{"type":"string"},"systemDateTime":{"type":"string","format":"date-time"},"user":{"type":"string"},"currentUserTimeZone":{"type":"string"},"currentUserDate":{"type":"string"},"currentUserTime":{"type":"string"}},"required":["id","client","operatingSystem","database","systemDateTime","user","currentUserTimeZone","currentUserDate","currentUserTime"]},"ZGW0001V1_TECHNICAL_SRV.userName":{"type":"object","properties":{"Bname":{"type":"string"},"Mandt":{"type":"string"},"NameFirst":{"type":"string"},"NameLast":{"type":"string"},"NameText":{"type":"string"}},"required":["Bname","Mandt","NameFirst","NameLast","NameText"]}},"securityDefinitions":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}}}

Before
image

After
screen shot 2017-07-31 at 10 32 10 pm

Request doesn't show headers...
image

Network debug also does not show headers...
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions