serenity-bdd / serenity-core

Serenity BDD is a test automation library designed to make writing automated acceptance tests easier, and more fun.
http://serenity-bdd.info
Other
719 stars 516 forks source link

How to change Authorization=Basic Og== ? #3545

Open jecardenasri01 opened 6 days ago

jecardenasri01 commented 6 days ago

What happened?

To run a service I must send an authorization + token but it returns an error.

on postman i send token and services responds 200 ok Basic bHFXXXXXXXXX

status 200 image status 500 image

Every time I send it to execute it brings me that field by default, how do I change it?

image image


I get token in header :

image image

What did you expect to happen?

Execute service ok

Serenity BDD version

4.1.10

JDK version

17

Execution environment

mac serenity rest

How to reproduce the bug.

this is my code credentials is confidential

actor.whoCan(CallAnApi.at(urlService)); switch (serviceType) { case "get": actor.attemptsTo( Get.resource(finalUrl) .with(request -> request.auth().preemptive().basic(user, pass) .header("Authorization","Basic bHFXXXXXXXXX") .contentType("application/json; charset=utf-8") ) ); break;

How can we make it happen?

Work on this myself and propose a PR (with Serenity BDD team guidance)