MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / authProjectID

Function authProjectID

internal/pluginhost/auth_callbacks.go:544–561  ·  view source on GitHub ↗
(auth *coreauth.Auth)

Source from the content-addressed store, hash-verified

542}
543
544func authProjectID(auth *coreauth.Auth) string {
545 if auth == nil {
546 return ""
547 }
548 if auth.Metadata != nil {
549 if v, ok := auth.Metadata["project_id"].(string); ok {
550 if projectID := strings.TrimSpace(v); projectID != "" {
551 return projectID
552 }
553 }
554 }
555 if auth.Attributes != nil {
556 if projectID := strings.TrimSpace(auth.Attributes["project_id"]); projectID != "" {
557 return projectID
558 }
559 }
560 return ""
561}
562
563func authAttribute(auth *coreauth.Auth, key string) string {
564 if auth == nil || len(auth.Attributes) == 0 {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected