Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jecardenasri01 opened this issue Sep 24, 2024 · 0 comments
Open

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

jecardenasri01 opened this issue Sep 24, 2024 · 0 comments

Comments

@jecardenasri01
Copy link

jecardenasri01 commented Sep 24, 2024

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)

@jecardenasri01 jecardenasri01 changed the title How to use authorization basic + token ? How to change Authorization=Basic Og== ? Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant