Documentation ¶
Index ¶
Constants ¶
View Source
const ( KeyPayloadContent = "PayloadContent" KeyPayloadType = "PayloadType" KeyChallenge = "Challenge" PayloadTypeSCEP = "com.apple.security.scep" )
Variables ¶
View Source
var ErrEmptyChallenge = errors.New("empty challenge")
Functions ¶
This section is empty.
Types ¶
type DynamicGenerator ¶
type DynamicGenerator struct { enrollprofile.Generator // contains filtered or unexported fields }
DynamicGenerator wraps an enrollprofile.Generator, getting a MicroMDM dynamic SCEP challenge and inserting it into the generated profile. The wrapped generator is expected to return a plain XML profile that is not signed
func New ¶
func New(gen enrollprofile.Generator, baseURL, apiKey string, opts ...Option) *DynamicGenerator
New returns a new DynamicGenerator with the wrapped generator and MicroMDM API URL and key. baseurl should be of the form http(s)://host[:port], e.g. "https://mdm.example.com"
func (*DynamicGenerator) GenerateEnrollProfile ¶
func (g *DynamicGenerator) GenerateEnrollProfile(reqctx context.Context, ctx enrollprofile.Context) ([]byte, error)
type MalformedProfileError ¶
type MalformedProfileError struct {
Err string
}
func (*MalformedProfileError) Error ¶
func (e *MalformedProfileError) Error() string
type Option ¶
type Option func(g *DynamicGenerator)
func WithHTTPClient ¶
WithHTTPClient configured the generator to use the http client. If left unconfigured, http.DefaultClient will be used
func WithLogger ¶
WithLogger configures the service with the given logger If left unconfigured, logging will be disabled
Click to show internal directories.
Click to hide internal directories.