Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ceremony ¶
type Ceremony struct { GetDeviceCredential func() (*devicepb.DeviceCredential, error) CollectDeviceData func(mode native.CollectDataMode) (*devicepb.DeviceCollectedData, error) SignChallenge func(chal []byte) (sig []byte, err error) SolveTPMAuthnDeviceChallenge func(challenge *devicepb.TPMAuthenticateDeviceChallenge) (*devicepb.TPMAuthenticateDeviceChallengeResponse, error) GetDeviceOSType func() devicepb.OSType }
Ceremony is the device authentication ceremony. It takes the client role of devicepb.DeviceTrustServiceClient.AuthenticateDevice
func NewCeremony ¶
func NewCeremony() *Ceremony
NewCeremony creates a new ceremony that delegates per-device behavior to lib/devicetrust/native. If you want to customize a Ceremony, for example for testing purposes, you may create a configure an instance directly, without calling this method.
func (*Ceremony) Run ¶
func (c *Ceremony) Run(ctx context.Context, devicesClient devicepb.DeviceTrustServiceClient, certs *devicepb.UserCertificates) (*devicepb.UserCertificates, error)
Run performs the client-side device authentication ceremony.
Device authentication requires a previously registered and enrolled device (see the lib/devicetrust/enroll package).
The outcome of the authentication ceremony is a pair of user certificates augmented with device extensions.