Skip to content

Failed authentication for WpComApiClient triggers /application-passwords/introspect check #776

Open
@oguzkocer

Description

@oguzkocer

If a WpComApiClient request fails with authentication error, it triggers the /application-passwords/introspect check. This will result in a crash, because it uses the /wp/v2 namespace.

Here is a Kotlin integration test to trigger the issue:

val authProvider = WpAuthenticationProvider.staticWithUsernameAndPassword(
    username = "foo", password = "bar"
)
val wpComClient = WpComApiClient(WpAuthenticationProvider.staticWithAuth(WpAuthentication.Bearer(token = "")))
val subscriberList = wpComClient.request { requestBuilder ->
    requestBuilder.subscribers().listSubscribers(wpComSiteId = 1111u, params = SubscribersListParams())
}.assertSuccessAndRetrieveData().data

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions