Files
EdgeCommon/pkg/serverconfigs/http_auth_methods.go
2024-05-17 18:28:59 +08:00

33 lines
933 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
//go:build !plus
package serverconfigs
type HTTPAuthType = string
const (
HTTPAuthTypeBasicAuth HTTPAuthType = "basicAuth" // BasicAuth
HTTPAuthTypeSubRequest HTTPAuthType = "subRequest" // 子请求
)
type HTTPAuthTypeDefinition struct {
Name string `json:"name"`
Code string `json:"code"`
Description string `json:"description"`
}
func FindAllHTTPAuthTypes(role string) []*HTTPAuthTypeDefinition {
return []*HTTPAuthTypeDefinition{
{
Name: "基本认证",
Code: HTTPAuthTypeBasicAuth,
Description: "BasicAuth最简单的HTTP请求认证方式通过传递<span class=\"ui label tiny basic text\">Authorization: Basic xxx</span> Header认证。",
},
{
Name: "子请求",
Code: HTTPAuthTypeSubRequest,
Description: "通过自定义的URL子请求来认证请求。",
},
}
}