mirror of
https://github.com/juanfont/headscale.git
synced 2026-10-15 19:25:23 +09:00
auth: generalise auth flow and introduce AuthVerdict
Generalise the registration pipeline to a more general auth pipeline supporting both node registrations and SSH check auth requests. Rename RegistrationID to AuthID, unexport AuthRequest fields, and introduce AuthVerdict to unify the auth finish API. Add the urlParam generic helper for extracting typed URL parameters from chi routes, used by the new auth request handler. Updates #1850
This commit is contained in:
1 parent
30338441c1
commit
cb3b6949ea
19 files changed
+443
-336
No files matched your search
@@ -37,7 +37,7 @@ var createNodeCmd = &cobra.Command{
|
||||
name, _ := cmd.Flags().GetString("name")
|
||||
registrationID, _ := cmd.Flags().GetString("key")
|
||||
|
||||
_, err := types.RegistrationIDFromString(registrationID)
|
||||
_, err := types.AuthIDFromString(registrationID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("parsing machine key: %w", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user