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
21 lines
583 B
Go
21 lines
583 B
Go
package templates
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/chasefleming/elem-go"
|
|
"github.com/juanfont/headscale/hscontrol/types"
|
|
)
|
|
|
|
func RegisterWeb(registrationID types.AuthID) *elem.Element {
|
|
return HtmlStructure(
|
|
elem.Title(nil, elem.Text("Registration - Headscale")),
|
|
mdTypesetBody(
|
|
headscaleLogo(),
|
|
H1(elem.Text("Machine registration")),
|
|
P(elem.Text("Run the command below in the headscale server to add this machine to your network:")),
|
|
Pre(PreCode(fmt.Sprintf("headscale nodes register --key %s --user USERNAME", registrationID.String()))),
|
|
pageFooter(),
|
|
),
|
|
)
|
|
}
|