registration

package
v2.7.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RegisterEABOptions

type RegisterEABOptions struct {
	TermsOfServiceAgreed bool
	Kid                  string
	HmacEncoded          string
}

type RegisterOptions

type RegisterOptions struct {
	TermsOfServiceAgreed bool
}

type Registrar

type Registrar struct {
	// contains filtered or unexported fields
}

func NewRegistrar

func NewRegistrar(core *api.Core, user User) *Registrar

func (*Registrar) DeleteRegistration

func (r *Registrar) DeleteRegistration() error

DeleteRegistration deletes the client's user registration from the ACME server.

func (*Registrar) QueryRegistration

func (r *Registrar) QueryRegistration() (*Resource, error)

QueryRegistration runs a POST request on the client's registration and returns the result.

This is similar to the Register function, but acting on an existing registration link and resource.

func (*Registrar) Register

func (r *Registrar) Register(options RegisterOptions) (*Resource, error)

Register the current account to the ACME server.

func (*Registrar) RegisterWithExternalAccountBinding

func (r *Registrar) RegisterWithExternalAccountBinding(options RegisterEABOptions) (*Resource, error)

RegisterWithExternalAccountBinding Register the current account to the ACME server.

func (*Registrar) ResolveAccountByKey

func (r *Registrar) ResolveAccountByKey() (*Resource, error)

ResolveAccountByKey will attempt to look up an account using the given account key and return its registration resource.

type Resource

type Resource struct {
	Body acme.Account `json:"body,omitempty"`
	URI  string       `json:"uri,omitempty"`
}

Resource represents all important information about a registration of which the client needs to keep track itself. WARNING: will be remove in the future (acme.ExtendedAccount), https://github.com/go-acme/lego/issues/855.

type User

type User interface {
	GetEmail() string
	GetRegistration() *Resource
	GetPrivateKey() crypto.PrivateKey
}

User interface is to be implemented by users of this library. It is used by the client type to get user specific information.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL