fleet/server/mdm/android/service.go
Magnus Jensen 9a859736c2
IdP Authentication before BYOD (#32017)
fixes: #29222 

This is a feature branch that was completed last week, but did not get
merged in time.

All pr's going in was approved, and reviewed.

I will after this is merged, do a cherry pick onto the RC 4.73 branch,
and initiate the FR merge process.

---------

Co-authored-by: Martin Angers <martin.n.angers@gmail.com>
Co-authored-by: Sarah Gillespie <73313222+gillespi314@users.noreply.github.com>
Co-authored-by: Gabriel Hernandez <ghernandez345@gmail.com>
2025-08-18 18:31:53 +02:00

41 lines
1.1 KiB
Go

package android
import (
"context"
)
type Service interface {
EnterpriseSignup(ctx context.Context) (*SignupDetails, error)
EnterpriseSignupCallback(ctx context.Context, signupToken string, enterpriseToken string) error
GetEnterprise(ctx context.Context) (*Enterprise, error)
DeleteEnterprise(ctx context.Context) error
EnterpriseSignupSSE(ctx context.Context) (chan string, error)
// CreateEnrollmentToken creates an enrollment token for a new Android device.
CreateEnrollmentToken(ctx context.Context, enrollSecret, idpUUID string) (*EnrollmentToken, error)
ProcessPubSubPush(ctx context.Context, token string, message *PubSubMessage) error
}
// /////////////////////////////////////////////
// Android API request and response structs
type DefaultResponse struct {
Err error `json:"error,omitempty"`
}
func (r DefaultResponse) Error() error { return r.Err }
type GetEnterpriseResponse struct {
EnterpriseID string `json:"android_enterprise_id"`
DefaultResponse
}
type EnterpriseSignupResponse struct {
Url string `json:"android_enterprise_signup_url"`
DefaultResponse
}
type EnrollmentTokenResponse struct {
*EnrollmentToken
DefaultResponse
}