MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / getAuthTokenType

Function getAuthTokenType

internal/vnc/proxy.go:558–572  ·  view source on GitHub ↗

getAuthTokenType returns a description of the authentication token type.

(token string)

Source from the content-addressed store, hash-verified

556
557// getAuthTokenType returns a description of the authentication token type.
558func getAuthTokenType(token string) string {
559 if token == "" {
560 return "none"
561 }
562
563 if strings.HasPrefix(token, "PVEAPIToken") {
564 return "API token"
565 }
566
567 if strings.HasPrefix(token, "PVEAuthCookie=") {
568 return "auth cookie"
569 }
570
571 return "unknown"
572}

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected