Hello Guys,I am verifying a request between a Kotl...
# pact-jvm
n
Hello Guys,I am verifying a request between a Kotlin based consumer and PHP based Provider service that requires authorization token send in request header (that does not change very frequently) so i added token in pact and consumer test which works fine but verifying the pact against provider respond with 401 error code.whats the best way to handle this? Should i add token on provider side(which i could not find way to add in pact-php) or i there a possibility to totally ignore token since we are using mock client to interact with provider and i don’t need to verify token.Please suggest.Thanks!
u
Raise this with the Pact PHP project
n
Thanks @uglyog,since i already added token in pact which is published on pact flow do i still need to do something on provider side?
u
Yes, I would imagine so. But I don't know your provider
n
make sense since its i php i will post on php channel but alos curios to know how it will be done between two java/kotlin based application.Can you point me to an example?
u
It depends on the application. Any example will be specific to how that application works.
n
message has been deleted
i am takling about X-Favor-token
d
@Nikita Gupta for our project, how we handle this is having a test profile for the provider service that allows basic authentication (username + password) in place of a token. Then the username and password is added to the headers of the provider contract test requests. Basic authentication is then disabled in prod environments for obvious reasons