add checkout middleware (#342)

Implement a connect service middleware which allows an operator to forcefully un-enroll a device. 

Documentation: https://github.com/micromdm/micromdm/wiki/Terminating-a-Management-Relationship-with-a-device-block
This commit is contained in:
Victor Vrantchan
2017-11-30 23:17:51 -05:00
committed by GitHub
parent a4bcc70a93
commit ce6e18f18d
21 changed files with 564 additions and 33 deletions

View File

@@ -0,0 +1,3 @@
package removeproto
//go:generate protoc --go_out=. remove.proto

View File

@@ -0,0 +1,59 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: remove.proto
/*
Package removeproto is a generated protocol buffer package.
It is generated from these files:
remove.proto
It has these top-level messages:
Device
*/
package removeproto
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type Device struct {
Udid string `protobuf:"bytes,1,opt,name=udid" json:"udid,omitempty"`
}
func (m *Device) Reset() { *m = Device{} }
func (m *Device) String() string { return proto.CompactTextString(m) }
func (*Device) ProtoMessage() {}
func (*Device) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *Device) GetUdid() string {
if m != nil {
return m.Udid
}
return ""
}
func init() {
proto.RegisterType((*Device)(nil), "removeproto.Device")
}
func init() { proto.RegisterFile("remove.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 75 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x4a, 0xcd, 0xcd,
0x2f, 0x4b, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x86, 0xf0, 0xc0, 0x1c, 0x25, 0x19,
0x2e, 0x36, 0x97, 0xd4, 0xb2, 0xcc, 0xe4, 0x54, 0x21, 0x21, 0x2e, 0x96, 0xd2, 0x94, 0xcc, 0x14,
0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x30, 0x3b, 0x89, 0x0d, 0xac, 0xc8, 0x18, 0x10, 0x00,
0x00, 0xff, 0xff, 0xf6, 0xb9, 0x87, 0xa4, 0x41, 0x00, 0x00, 0x00,
}

View File

@@ -0,0 +1,7 @@
syntax = "proto3";
package removeproto;
message Device {
string udid = 1;
}