Documentation ¶
Overview ¶
VAS is a simple implimentation of the Chrome Verified Access API, which does not support the certificate flow. Pay special attention to https://support.google.com/chrome/a/answer/7156268 when setting this up. There are several things you have to configure in user settings, device settings, and extension settings.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_vas_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type SignedData ¶
type SignedData struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` // contains filtered or unexported fields }
func (*SignedData) Descriptor
deprecated
func (*SignedData) Descriptor() ([]byte, []int)
Deprecated: Use SignedData.ProtoReflect.Descriptor instead.
func (*SignedData) GetData ¶
func (x *SignedData) GetData() []byte
func (*SignedData) GetSignature ¶
func (x *SignedData) GetSignature() []byte
func (*SignedData) ProtoMessage ¶
func (*SignedData) ProtoMessage()
func (*SignedData) ProtoReflect ¶
func (x *SignedData) ProtoReflect() protoreflect.Message
func (*SignedData) Reset ¶
func (x *SignedData) Reset()
func (*SignedData) String ¶
func (x *SignedData) String() string
type VAS ¶
type VAS struct {
// contains filtered or unexported fields
}
VAS represents authentication information necessary to make calls to the Chrome Verified Access Service.
func NewFromChallengeService ¶
func NewFromChallengeService(cs *verifiedaccess.ChallengeService) VAS
NewFromChallengeService returns a VAS from a verifiedaccess.ChallengeService you construct yourself. This allows you to use an API key if you want, though note that it appears API key authenticated clients can only create and not verify requests.
func NewFromOAuthClient ¶
NewFromOAuthClient is probably the easiest way to create a VAS. Get an OAuth client by calling `.Client()` on an `oauth2.Config` struct. You can find many examples of how to do this online, as this is a common flow for using any Google API.
func (VAS) GetChallenge ¶
GetChallenge returns a base64 encoded string which should be de-serialized in to an ArrayBuffer (see util.js) and passed to chrome.enterprise.platformKeys.challengeMachineKey or chrome.enterprise.platformKeys.challengeUserKey
func (VAS) VerifyResponse ¶
func (vas VAS) VerifyResponse( respFromChromebook string, expectedIdentity string, ) ( deviceID string, err error, )
VerifyResponse verifies a serialized ArrayBuffer response from chrome.enterprise.platformKeys.challengeMachineKey or chrome.enterprise.platformKeys.challengeUserKey. If verifying a user, you should put the expected email address of the user in the `expectedIdentity` field. If verifying a device you may put the domain in the `expectedIdentity` field, though this is optional. If verifying a device, the device's device ID will be returned as a string. Failures of any kind (authentication failures or application issues) are returned as errors.