Documentation
¶
Index ¶
Constants ¶
View Source
const EscrowKeyUnlockURL = "https://deviceservices-external.apple.com/deviceservicesworkers/escrowKeyUnlock"
Variables ¶
This section is empty.
Functions ¶
func DoEscrowKeyUnlock ¶
func DoEscrowKeyUnlock(ctx context.Context, store storage.PushCertStore, topic string, client *http.Client, queryParams, formParams url.Values) (*http.Response, error)
DoEscrowKeyUnlock sends an "escrow key unlock" request to Apple. Mutual TLS authentication against the endpoint uses the APNs TLS keypair identified by topic in store. Required parameters must be supplied in queryParams and formParams: see EscrowKeyUnlockParams. Caller is responsible for reading and closing HTTP response. See https://developer.apple.com/documentation/devicemanagement/creating-and-using-bypass-codes
Types ¶
type EscrowKeyUnlockParams ¶
type EscrowKeyUnlockParams struct {
// The deviceʼs serial number (required).
// Provided in URL request string as "serial".
Serial string
// The device’s IMEI (omit for non-cellular devices).
// Provided in URL request string as "imei".
IMEI string
// The device’s secondary IMEI (omit for non-cellular and
// single-SIM devices).
// Provided in URL request string as "imei2".
IMEI2 string
// The device’s MEID (omit for non-cellular devices).
// Provided in URL request string as "meid".
MEID string
// Example: iPad4,1 (required).
// Provided in URL request string as "productType".
ProductType string
// The client-supplied value for auditing purposes: a string that
// identifies the name of the organization.
// Provided in request form (body) as "orgName".
OrgName string
// The client-supplied value for auditing purposes: a string that
// identifies the user requesting the removal (such as email, LDAP
// ID, or name).
// Provided in request form (body) as "guid".
GUID string
// The device’s bypass code.
// Provided in request form (body) as "escrowKey".
// Note: This escrow key is the dash-separated "human readable" form.
EscrowKey string
}
func (*EscrowKeyUnlockParams) FormParams ¶
func (e *EscrowKeyUnlockParams) FormParams() url.Values
QueryParams builds form parameters for the "escrow key unlock" endpoint.
func (*EscrowKeyUnlockParams) QueryParams ¶
func (e *EscrowKeyUnlockParams) QueryParams() url.Values
QueryParams builds query parameters for the "escrow key unlock" endpoint.
func (*EscrowKeyUnlockParams) Valid ¶
func (e *EscrowKeyUnlockParams) Valid() bool
Valid tests e for validity and required non-empty fields.
Click to show internal directories.
Click to hide internal directories.