PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0
Showing posts with label api-gateway. Show all posts
Showing posts with label api-gateway. Show all posts

Thursday, November 10, 2022

[FIXED] How to pass API token to the backend

 November 10, 2022     3scale, api, api-gateway, ibm-api-management, redhat     No comments   

Issue

I'm new to the 3 scale API management. I have configured a backend API, however this private API requires an API Key to authenticate. That being said, no where on the 3 scale backend configuration I can configure an API Key.

I'm aware that the APIcast requires a Secret Token to forward the request to the backend. From that point, my Private API requires an API Key.


Solution

I think you should use "Header Modification Policy" (YourProduct -> Integration -> Policies) to add or update your header with your API Key value.



Answered By - Evgenii
Answer Checked By - Candace Johnson (PHPFixing Volunteer)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

Friday, August 5, 2022

[FIXED] What is the cause of FluentValidation Method Not Found exception?

 August 05, 2022     api-gateway, exception, fluentvalidation     No comments   

Issue

I've got a Domain Driven Design solution and for some reason, I'm getting this exception at RunTime when the API call is made through GateWay:

One or more errors occurred. (Method not found: 'Void FluentValidation.AbstractValidator`1.When(System.Func`2<!0,Boolean>, System.Action)'.)

The error occurs as below:

I have solution like this:

The main 4 project I'm focusing on right now are:

  1. Core.Model
  2. Account.Api
  3. Service.Api.Gateway
  4. Web.ClientSite

Web.ClientSite makes request to Service.Api.Gateway which then calls Account.Api. Note that Core.Model is referenced everywhere

VERY IMPORTANT: If I remove the reference of FluentValidation from Core.Model, the exception disappears.

I'm hoping these information is enough. Why do you think I'm getting this exception and how can I eliminate.


Solution

Looks like some of libs (ocelot) are incompatible with new changes in FluentValidation 8.1.2. Try to downgrade to FluentValidation before 8.1.2. Hope it helps



Answered By - Alexey.Petriashev
Answer Checked By - Robin (PHPFixing Admin)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Older Posts Home

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
All Comments
Atom
All Comments

Copyright © PHPFixing