0

I'm using cypress-ntlm-auth plugin in my cypress automation project, providing me windows authentication (Ntlm, kerberos etc.)

In particular, I use the ntlmSso option for Negotiate with my app. If the server sends an authentication challenge, the ntlm-proxy will perform a NTLM or Negotiate login handshake with the credentials of the user running the test client.

The problem is that I need to use a pre-defined user (to be used in my pre-prod environment) to make api requests, instead of the logged on user on the computer.

How can I do that? thanks in advance

or gibor
  • 41
  • 1

1 Answers1

0

The cypress-ntlm-auth library allows you to specify this with cy.ntlm(), by passing in hosts, username, password, and domain.

cy.ntlm(["my.host.com"], "myUser", "myPass", "myDomain")

Check out the docs here. Take note of their strategy on storing passwords.

agoff
  • 5,818
  • 1
  • 7
  • 20