sftpgo-mirror/acme/account.go
Nicola Murino 7c724e18fe
add support for ACME compliant certificate authorities
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2022-05-27 07:39:55 +02:00

32 lines
691 B
Go

package acme
import (
"crypto"
"github.com/go-acme/lego/v4/registration"
)
type account struct {
Email string `json:"email"`
Registration *registration.Resource `json:"registration"`
key crypto.PrivateKey
}
/** Implementation of the registration.User interface **/
// GetEmail returns the email address for the account.
func (a *account) GetEmail() string {
return a.Email
}
// GetRegistration returns the server registration.
func (a *account) GetRegistration() *registration.Resource {
return a.Registration
}
// GetPrivateKey returns the private account key.
func (a *account) GetPrivateKey() crypto.PrivateKey {
return a.key
}
/** End **/