Layer7 API Management

Expand all | Collapse all

How to add Authorization Header

  • 1.  How to add Authorization Header

    Posted 09-12-2016 04:16 PM

    I am trying to add a Authorization in Http routing properties, Its throwing error -OAuth Token variable : invalid syntax . I tried to add a Authorization Header in header section and trying to add Use OAuth Authorization option in Authorization section.



  • 2.  Re: How to add Authorization Header

    Posted 09-12-2016 05:38 PM

    Brijendra,

     

    Good afternoon. The "Use OAuth Authorization" expects that in the policy logic prior that you have obtained the OAuth token and is present in the specified context variable used. The value in the Token variable will be ${<context variable with token>} and based on the version selection will do one of the following (Excerpt from online documentation: Route via HTTP(S) Assertion - CA API Gateway - 9.1 - CA Technologies Documentation ):

    The OAuth version determines what is prepended to the contents of the token variable in the Authorization header value.

    • For OAuth 1.0, this is the equivalent of adding an Authorization header with the value "OAuth ${var}".
    • Otherwise, it is equivalent to adding an Authorization header with the value "Bearer ${var}".

     

    Sincerely,

     

    Stephen Hughes

    Director, CA Support



  • 3.  Re: How to add Authorization Header

    Posted 09-13-2016 01:25 PM

    Hi Brijendra,

    please let us know which policy you are trying to modify. The more details you have the better.

    Thanks