mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-24 22:16:36 +08:00
[SSL证书]免费证书申请增加HTTP认证方式
This commit is contained in:
23
internal/acme/http_provider.go
Normal file
23
internal/acme/http_provider.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package acme
|
||||
|
||||
type HTTPProvider struct {
|
||||
onAuth AuthCallback
|
||||
}
|
||||
|
||||
func NewHTTPProvider(onAuth AuthCallback) *HTTPProvider {
|
||||
return &HTTPProvider{
|
||||
onAuth: onAuth,
|
||||
}
|
||||
}
|
||||
|
||||
func (this *HTTPProvider) Present(domain, token, keyAuth string) error {
|
||||
if this.onAuth != nil {
|
||||
this.onAuth(domain, token, keyAuth)
|
||||
}
|
||||
//http01.ChallengePath()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (this *HTTPProvider) CleanUp(domain, token, keyAuth string) error {
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user