mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-24 13:15:52 -05:00
Added more debug messages in OIDC registration
This commit is contained in:
parent
3d4af52b3a
commit
8909f801bb
7
oidc.go
7
oidc.go
@ -77,9 +77,10 @@ func (h *Headscale) RegisterOIDC(
|
||||
vars := mux.Vars(req)
|
||||
nodeKeyStr, ok := vars["nkey"]
|
||||
|
||||
log.Trace().
|
||||
log.Debug().
|
||||
Caller().
|
||||
Str("node_key", nodeKeyStr).
|
||||
Bool("ok", ok).
|
||||
Msg("Received oidc register call")
|
||||
|
||||
if !NodePublicKeyRegex.Match([]byte(nodeKeyStr)) {
|
||||
@ -107,7 +108,9 @@ func (h *Headscale) RegisterOIDC(
|
||||
)
|
||||
|
||||
if !ok || nodeKeyStr == "" || err != nil {
|
||||
log.Warn().Err(err).Msg("Failed to parse incoming nodekey")
|
||||
log.Warn().
|
||||
Err(err).
|
||||
Msg("Failed to parse incoming nodekey in OIDC registration")
|
||||
|
||||
writer.Header().Set("Content-Type", "text/plain; charset=utf-8")
|
||||
writer.WriteHeader(http.StatusBadRequest)
|
||||
|
Loading…
Reference in New Issue
Block a user