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

Add the ability to customize token header #30

Open
travishathaway opened this issue Nov 28, 2023 · 0 comments
Open

Add the ability to customize token header #30

travishathaway opened this issue Nov 28, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@travishathaway
Copy link
Collaborator

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

@travishathaway travishathaway added the enhancement New feature or request label Nov 28, 2023
@travishathaway travishathaway moved this to Available issues in conda-auth Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Available issues
Development

No branches or pull requests

1 participant