Skip to content

Add the ability to customize token header #30

@travishathaway

Description

@travishathaway

What is the idea?

Token headers can come in different shapes and forms. Currently, we support the following formats:

Authorization: token <token>

and

Authorization: Bearer <token>

Instead of adding more and more types, let's just make the token header configurable.

Why is this needed?

To be flexible enough to support any header token setup.

What should happen?

The conda auth login --token command should receive a new --header/-h option that will allow for customizing the name of the token header. It should also accept a --token-template option that will accommodate adding extra text to the header field.

The following will be possible afterwards...

Setting a custom header name:

conda auth login --token --header X-Auth

Setting a custom header name and a template for the token value:

conda auth login --token --header Authorization --header-template 'Bearer {token}'

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Available issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions