Skip to content

[Confluence] Token based authorization overridden by content of netrc #1512

Open
@phantomGik

Description

@phantomGik

An issue with Confluence API authentication

Description

When using token-based authentication, I encountered a 401 Unauthorized error. However, when testing the same token with curl, it worked correctly. After further investigation, I found that I had an outdated .netrc file with incorrect credentials. Once I removed the .netrc file, the token authentication started working as expected.

Unexpected Behavior

The library appears to prioritize .netrc credentials over the explicitly provided token, leading to an authentication failure when incorrect credentials are present in .netrc.

Expected Behavior

When a token is explicitly provided, .netrc should be ignored, ensuring that token authentication functions correctly.

Environment

python==3.8
atlassian-python-api==3.41.21
requests==2.31.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions