package core
// The identity dolt.sr.ht's companion-provisioning call travels under: the
// "Authorization: Internal <token>" payload cmd/dolt-git-hook mints and the
// caller web's guard on /internal/repos pins.
//
// They are two constants in the pure domain package rather than two string
// literals in two commands because the guard now *pins* them (it refuses a
// token naming anyone else), and a pin whose two ends are spelled separately is
// a pin that can be half-changed. Renaming the hook's node id in one file would
// not fail to compile and would not fail a test — companion databases would
// simply stop being provisioned on the next push, which is the failure mode
// sr-ht-ecore/internalauth exists to make impossible. Here it is a compile-time
// fact shared by both ends.
const (
// InternalClientID names the calling service. It is git.sr.ht's, not
// dolt.sr.ht's: the hook runs as git.sr.ht's post-update script and calls
// in on git.sr.ht's behalf.
InternalClientID = "git.sr.ht"
// InternalNodeID names the program within that service — the hook binary,
// which is the only thing on the instance that may drive /internal/repos.
InternalNodeID = "dolt-git-hook"
)