Documentation
¶
Overview ¶
Package protocol implements primitives and interfaces of the base Apple MDM protocol.
Index ¶
Constants ¶
View Source
const ( // CheckInMIMEType is the HTTP MIME type of Apple MDM check-in messages. CheckInMIMEType = "application/x-apple-aspen-mdm-checkin" // MDMSignatureHeader is the HTTP header name for the in-message // signature checking. MDMSignatureHeader = "Mdm-Signature" )
Variables ¶
View Source
var ( ErrMissingDeviceIdentity = errors.New("missing device identity") ErrNilTransport = errors.New("nil transport") )
Functions ¶
This section is empty.
Types ¶
type IdentityProvider ¶
type IdentityProvider func(context.Context) (*x509.Certificate, crypto.PrivateKey, error)
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport encapsulates the MDM enrollment underlying MDM transport. The MDM channels utilize this transport to communicate with the host.
func NewTransport ¶
func NewTransport(opts ...TransportOption) *Transport
func (*Transport) DoCheckIn ¶
DoCheckIn executes a check-in request with body. The caller is responsible for closing the response body.
type TransportOption ¶
type TransportOption func(*Transport)
func WithClient ¶
func WithClient(doer Doer) TransportOption
WithClient configures the HTTP client for this transport.
func WithIdentityProvider ¶
func WithIdentityProvider(f IdentityProvider) TransportOption
WithIdentityProvider configures the certificate and private key provider for this transport.
func WithMDMURLs ¶
func WithMDMURLs(serverURL, checkInURL string) TransportOption
WithMDMURLs supplies the ServerURL and CheckInURLs to the transport. Per MDM spec checkInURL is optional.
func WithSignMessage ¶
func WithSignMessage() TransportOption
WithSignMessage include the signed message header.
Click to show internal directories.
Click to hide internal directories.