Skip to content

protocol: add support for 'authtype' capability - #2457

Open
becm wants to merge 2 commits into
git-ecosystem:mainfrom
becm:authtype
Open

becm wants to merge 2 commits into
git-ecosystem:mainfrom
becm:authtype

Conversation

@becm

@becm becm commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

switch to alternative credential properties for 'authtype'
add support for 'ephemeral' state to protocol and basic credential interface

add and register capability flag for 'authtype'
create credential output based on Authorization type and support
define and use Constants for credential protocol keys
move default arguments for GitResponse flags to internal constructor
@becm
becm requested a review from a team as a code owner September 26, 2026 20:39
@becm

becm commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor Author

This lays the required ground work for an improved multi-token provider data flow:

  • move all token verify and storage operations to get phase to avoid races or storage target mismatch
  • emit access_token credentials as ephemeral
  • do not act on ephemeral credentials in the respective store or erase phase
    (use state[] entry to pass on selected provider, no need to identify matching credential).

This would move away from the classic Git credential validation data flow.
Even if Git deems the provided token invalid, the provider already supplied its best (validated) result.

@becm becm changed the title protocal: add support for 'authtype' capability protocol: add support for 'authtype' capability Sep 26, 2026

@mjcheetham mjcheetham left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a reasonable addition! Just one comment about the IsTruthy reimplementation.

Comment thread src/Core/GitRequest.cs Outdated
emit 'ephemeral' state in GitResponse if required capability is present
check 'ephemeral' setting in GitRequest content
@becm

becm commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor Author

@mjcheetham location of the IsEphemeral flag honestly came down to a coin toss.

I would have no reservations to putting it next to the other flags in GitResponse.
Would only need to be where it is, if a (future) storage layer wants to make use of it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants