github.com/gravitational/teleport/api@v0.0.0-20240507183017-3110591cbafc/types/webauthn/webauthn.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: teleport/legacy/types/webauthn/webauthn.proto 3 4 // Package WebAuthn maps WebAuthn messages to protocol buffers. 5 // 6 // The mapping is designed to match both the WebAuthn specification and the 7 // capabilities of current browser implementations. 8 // 9 // REST-based Teleport APIs will make an effort to transmit or embed JSON 10 // messages matching the github.com/go-webauthn/webauthn reference implementation, 11 // to allow for easy browser integration. gRPC APIs are not meant for REST use 12 // and thus make no such promises, although the correspondence should be 13 // obvious. 14 // 15 // Note that, ordinarily, various fields in WebAuthn messages are encoded using 16 // "RawURLEncoding" (aka, base64 URL encoding without padding). This is not the 17 // case for _any_ of the fields mapped here, all bytes fields are transmitted 18 // raw/unencoded. 19 20 package webauthnpb 21 22 import ( 23 fmt "fmt" 24 _ "github.com/gogo/protobuf/gogoproto" 25 proto "github.com/gogo/protobuf/proto" 26 io "io" 27 math "math" 28 math_bits "math/bits" 29 ) 30 31 // Reference imports to suppress errors if they are not otherwise used. 32 var _ = proto.Marshal 33 var _ = fmt.Errorf 34 var _ = math.Inf 35 36 // This is a compile-time assertion to ensure that this generated file 37 // is compatible with the proto package it is being compiled against. 38 // A compilation error at this line likely means your copy of the 39 // proto package needs to be updated. 40 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 41 42 // Credential assertion used for login ceremonies. 43 type CredentialAssertion struct { 44 PublicKey *PublicKeyCredentialRequestOptions `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` 45 XXX_NoUnkeyedLiteral struct{} `json:"-"` 46 XXX_unrecognized []byte `json:"-"` 47 XXX_sizecache int32 `json:"-"` 48 } 49 50 func (m *CredentialAssertion) Reset() { *m = CredentialAssertion{} } 51 func (m *CredentialAssertion) String() string { return proto.CompactTextString(m) } 52 func (*CredentialAssertion) ProtoMessage() {} 53 func (*CredentialAssertion) Descriptor() ([]byte, []int) { 54 return fileDescriptor_0d490a6db28e8798, []int{0} 55 } 56 func (m *CredentialAssertion) XXX_Unmarshal(b []byte) error { 57 return m.Unmarshal(b) 58 } 59 func (m *CredentialAssertion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 60 if deterministic { 61 return xxx_messageInfo_CredentialAssertion.Marshal(b, m, deterministic) 62 } else { 63 b = b[:cap(b)] 64 n, err := m.MarshalToSizedBuffer(b) 65 if err != nil { 66 return nil, err 67 } 68 return b[:n], nil 69 } 70 } 71 func (m *CredentialAssertion) XXX_Merge(src proto.Message) { 72 xxx_messageInfo_CredentialAssertion.Merge(m, src) 73 } 74 func (m *CredentialAssertion) XXX_Size() int { 75 return m.Size() 76 } 77 func (m *CredentialAssertion) XXX_DiscardUnknown() { 78 xxx_messageInfo_CredentialAssertion.DiscardUnknown(m) 79 } 80 81 var xxx_messageInfo_CredentialAssertion proto.InternalMessageInfo 82 83 func (m *CredentialAssertion) GetPublicKey() *PublicKeyCredentialRequestOptions { 84 if m != nil { 85 return m.PublicKey 86 } 87 return nil 88 } 89 90 // Request options necessary for credential assertions, aka login ceremonies. 91 // See https://www.w3.org/TR/webauthn-2/#dictionary-assertion-options or 92 // refer to navigator.credentials.get in your browser. 93 type PublicKeyCredentialRequestOptions struct { 94 // Raw challenge used for assertion. 95 Challenge []byte `protobuf:"bytes,1,opt,name=challenge,proto3" json:"challenge,omitempty"` 96 // Timeout in milliseconds. 97 TimeoutMs int64 `protobuf:"varint,2,opt,name=timeout_ms,json=timeoutMs,proto3" json:"timeout_ms,omitempty"` 98 // Relying Party ID. 99 RpId string `protobuf:"bytes,3,opt,name=rp_id,json=rpId,proto3" json:"rp_id,omitempty"` 100 // Allowed credentials for assertion. 101 AllowCredentials []*CredentialDescriptor `protobuf:"bytes,4,rep,name=allow_credentials,json=allowCredentials,proto3" json:"allow_credentials,omitempty"` 102 // Extensions supplied by the Relying Party. 103 Extensions *AuthenticationExtensionsClientInputs `protobuf:"bytes,5,opt,name=extensions,proto3" json:"extensions,omitempty"` 104 // User verification requirement. 105 UserVerification string `protobuf:"bytes,6,opt,name=user_verification,json=userVerification,proto3" json:"user_verification,omitempty"` 106 XXX_NoUnkeyedLiteral struct{} `json:"-"` 107 XXX_unrecognized []byte `json:"-"` 108 XXX_sizecache int32 `json:"-"` 109 } 110 111 func (m *PublicKeyCredentialRequestOptions) Reset() { *m = PublicKeyCredentialRequestOptions{} } 112 func (m *PublicKeyCredentialRequestOptions) String() string { return proto.CompactTextString(m) } 113 func (*PublicKeyCredentialRequestOptions) ProtoMessage() {} 114 func (*PublicKeyCredentialRequestOptions) Descriptor() ([]byte, []int) { 115 return fileDescriptor_0d490a6db28e8798, []int{1} 116 } 117 func (m *PublicKeyCredentialRequestOptions) XXX_Unmarshal(b []byte) error { 118 return m.Unmarshal(b) 119 } 120 func (m *PublicKeyCredentialRequestOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 121 if deterministic { 122 return xxx_messageInfo_PublicKeyCredentialRequestOptions.Marshal(b, m, deterministic) 123 } else { 124 b = b[:cap(b)] 125 n, err := m.MarshalToSizedBuffer(b) 126 if err != nil { 127 return nil, err 128 } 129 return b[:n], nil 130 } 131 } 132 func (m *PublicKeyCredentialRequestOptions) XXX_Merge(src proto.Message) { 133 xxx_messageInfo_PublicKeyCredentialRequestOptions.Merge(m, src) 134 } 135 func (m *PublicKeyCredentialRequestOptions) XXX_Size() int { 136 return m.Size() 137 } 138 func (m *PublicKeyCredentialRequestOptions) XXX_DiscardUnknown() { 139 xxx_messageInfo_PublicKeyCredentialRequestOptions.DiscardUnknown(m) 140 } 141 142 var xxx_messageInfo_PublicKeyCredentialRequestOptions proto.InternalMessageInfo 143 144 func (m *PublicKeyCredentialRequestOptions) GetChallenge() []byte { 145 if m != nil { 146 return m.Challenge 147 } 148 return nil 149 } 150 151 func (m *PublicKeyCredentialRequestOptions) GetTimeoutMs() int64 { 152 if m != nil { 153 return m.TimeoutMs 154 } 155 return 0 156 } 157 158 func (m *PublicKeyCredentialRequestOptions) GetRpId() string { 159 if m != nil { 160 return m.RpId 161 } 162 return "" 163 } 164 165 func (m *PublicKeyCredentialRequestOptions) GetAllowCredentials() []*CredentialDescriptor { 166 if m != nil { 167 return m.AllowCredentials 168 } 169 return nil 170 } 171 172 func (m *PublicKeyCredentialRequestOptions) GetExtensions() *AuthenticationExtensionsClientInputs { 173 if m != nil { 174 return m.Extensions 175 } 176 return nil 177 } 178 179 func (m *PublicKeyCredentialRequestOptions) GetUserVerification() string { 180 if m != nil { 181 return m.UserVerification 182 } 183 return "" 184 } 185 186 // Assertion response returned by the authenticator. 187 // Refer to navigator.credentials.get in your browser. 188 type CredentialAssertionResponse struct { 189 // Type of the credential, usually "public-key". 190 Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` 191 // Raw Credential ID. 192 RawId []byte `protobuf:"bytes,2,opt,name=raw_id,json=rawId,proto3" json:"raw_id,omitempty"` 193 // Assertion response from the authenticator. 194 Response *AuthenticatorAssertionResponse `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"` 195 // Extensions supplied by the authenticator. 196 Extensions *AuthenticationExtensionsClientOutputs `protobuf:"bytes,4,opt,name=extensions,proto3" json:"extensions,omitempty"` 197 XXX_NoUnkeyedLiteral struct{} `json:"-"` 198 XXX_unrecognized []byte `json:"-"` 199 XXX_sizecache int32 `json:"-"` 200 } 201 202 func (m *CredentialAssertionResponse) Reset() { *m = CredentialAssertionResponse{} } 203 func (m *CredentialAssertionResponse) String() string { return proto.CompactTextString(m) } 204 func (*CredentialAssertionResponse) ProtoMessage() {} 205 func (*CredentialAssertionResponse) Descriptor() ([]byte, []int) { 206 return fileDescriptor_0d490a6db28e8798, []int{2} 207 } 208 func (m *CredentialAssertionResponse) XXX_Unmarshal(b []byte) error { 209 return m.Unmarshal(b) 210 } 211 func (m *CredentialAssertionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 212 if deterministic { 213 return xxx_messageInfo_CredentialAssertionResponse.Marshal(b, m, deterministic) 214 } else { 215 b = b[:cap(b)] 216 n, err := m.MarshalToSizedBuffer(b) 217 if err != nil { 218 return nil, err 219 } 220 return b[:n], nil 221 } 222 } 223 func (m *CredentialAssertionResponse) XXX_Merge(src proto.Message) { 224 xxx_messageInfo_CredentialAssertionResponse.Merge(m, src) 225 } 226 func (m *CredentialAssertionResponse) XXX_Size() int { 227 return m.Size() 228 } 229 func (m *CredentialAssertionResponse) XXX_DiscardUnknown() { 230 xxx_messageInfo_CredentialAssertionResponse.DiscardUnknown(m) 231 } 232 233 var xxx_messageInfo_CredentialAssertionResponse proto.InternalMessageInfo 234 235 func (m *CredentialAssertionResponse) GetType() string { 236 if m != nil { 237 return m.Type 238 } 239 return "" 240 } 241 242 func (m *CredentialAssertionResponse) GetRawId() []byte { 243 if m != nil { 244 return m.RawId 245 } 246 return nil 247 } 248 249 func (m *CredentialAssertionResponse) GetResponse() *AuthenticatorAssertionResponse { 250 if m != nil { 251 return m.Response 252 } 253 return nil 254 } 255 256 func (m *CredentialAssertionResponse) GetExtensions() *AuthenticationExtensionsClientOutputs { 257 if m != nil { 258 return m.Extensions 259 } 260 return nil 261 } 262 263 // Authenticator assertion response. 264 // https://www.w3.org/TR/webauthn-2/#authenticatorassertionresponse 265 type AuthenticatorAssertionResponse struct { 266 // Raw client data JSON, exactly as signed by the authenticator. 267 // https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata. 268 ClientDataJson []byte `protobuf:"bytes,1,opt,name=client_data_json,json=clientDataJson,proto3" json:"client_data_json,omitempty"` 269 // Raw authenticator data, exactly as signed by the authenticator. 270 // https://www.w3.org/TR/webauthn-2/#sctn-authenticator-data. 271 AuthenticatorData []byte `protobuf:"bytes,2,opt,name=authenticator_data,json=authenticatorData,proto3" json:"authenticator_data,omitempty"` 272 // Raw assertion signature performed authenticatorData|clientDataJSON. 273 // https://www.w3.org/TR/webauthn-2/#assertion-signature. 274 Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` 275 // Raw user handle returned by the authenticator, if any. 276 UserHandle []byte `protobuf:"bytes,4,opt,name=user_handle,json=userHandle,proto3" json:"user_handle,omitempty"` 277 XXX_NoUnkeyedLiteral struct{} `json:"-"` 278 XXX_unrecognized []byte `json:"-"` 279 XXX_sizecache int32 `json:"-"` 280 } 281 282 func (m *AuthenticatorAssertionResponse) Reset() { *m = AuthenticatorAssertionResponse{} } 283 func (m *AuthenticatorAssertionResponse) String() string { return proto.CompactTextString(m) } 284 func (*AuthenticatorAssertionResponse) ProtoMessage() {} 285 func (*AuthenticatorAssertionResponse) Descriptor() ([]byte, []int) { 286 return fileDescriptor_0d490a6db28e8798, []int{3} 287 } 288 func (m *AuthenticatorAssertionResponse) XXX_Unmarshal(b []byte) error { 289 return m.Unmarshal(b) 290 } 291 func (m *AuthenticatorAssertionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 292 if deterministic { 293 return xxx_messageInfo_AuthenticatorAssertionResponse.Marshal(b, m, deterministic) 294 } else { 295 b = b[:cap(b)] 296 n, err := m.MarshalToSizedBuffer(b) 297 if err != nil { 298 return nil, err 299 } 300 return b[:n], nil 301 } 302 } 303 func (m *AuthenticatorAssertionResponse) XXX_Merge(src proto.Message) { 304 xxx_messageInfo_AuthenticatorAssertionResponse.Merge(m, src) 305 } 306 func (m *AuthenticatorAssertionResponse) XXX_Size() int { 307 return m.Size() 308 } 309 func (m *AuthenticatorAssertionResponse) XXX_DiscardUnknown() { 310 xxx_messageInfo_AuthenticatorAssertionResponse.DiscardUnknown(m) 311 } 312 313 var xxx_messageInfo_AuthenticatorAssertionResponse proto.InternalMessageInfo 314 315 func (m *AuthenticatorAssertionResponse) GetClientDataJson() []byte { 316 if m != nil { 317 return m.ClientDataJson 318 } 319 return nil 320 } 321 322 func (m *AuthenticatorAssertionResponse) GetAuthenticatorData() []byte { 323 if m != nil { 324 return m.AuthenticatorData 325 } 326 return nil 327 } 328 329 func (m *AuthenticatorAssertionResponse) GetSignature() []byte { 330 if m != nil { 331 return m.Signature 332 } 333 return nil 334 } 335 336 func (m *AuthenticatorAssertionResponse) GetUserHandle() []byte { 337 if m != nil { 338 return m.UserHandle 339 } 340 return nil 341 } 342 343 // Credential creation used for registration ceremonies. 344 type CredentialCreation struct { 345 PublicKey *PublicKeyCredentialCreationOptions `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` 346 XXX_NoUnkeyedLiteral struct{} `json:"-"` 347 XXX_unrecognized []byte `json:"-"` 348 XXX_sizecache int32 `json:"-"` 349 } 350 351 func (m *CredentialCreation) Reset() { *m = CredentialCreation{} } 352 func (m *CredentialCreation) String() string { return proto.CompactTextString(m) } 353 func (*CredentialCreation) ProtoMessage() {} 354 func (*CredentialCreation) Descriptor() ([]byte, []int) { 355 return fileDescriptor_0d490a6db28e8798, []int{4} 356 } 357 func (m *CredentialCreation) XXX_Unmarshal(b []byte) error { 358 return m.Unmarshal(b) 359 } 360 func (m *CredentialCreation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 361 if deterministic { 362 return xxx_messageInfo_CredentialCreation.Marshal(b, m, deterministic) 363 } else { 364 b = b[:cap(b)] 365 n, err := m.MarshalToSizedBuffer(b) 366 if err != nil { 367 return nil, err 368 } 369 return b[:n], nil 370 } 371 } 372 func (m *CredentialCreation) XXX_Merge(src proto.Message) { 373 xxx_messageInfo_CredentialCreation.Merge(m, src) 374 } 375 func (m *CredentialCreation) XXX_Size() int { 376 return m.Size() 377 } 378 func (m *CredentialCreation) XXX_DiscardUnknown() { 379 xxx_messageInfo_CredentialCreation.DiscardUnknown(m) 380 } 381 382 var xxx_messageInfo_CredentialCreation proto.InternalMessageInfo 383 384 func (m *CredentialCreation) GetPublicKey() *PublicKeyCredentialCreationOptions { 385 if m != nil { 386 return m.PublicKey 387 } 388 return nil 389 } 390 391 // Request options necessary for credential creation, aka registration 392 // ceremonies. 393 // See 394 // https://www.w3.org/TR/webauthn-2/#dictdef-publickeycredentialcreationoptions 395 // or refer to navigator.credentials.create in your browser. 396 type PublicKeyCredentialCreationOptions struct { 397 // Raw challenge used for creation. 398 Challenge []byte `protobuf:"bytes,1,opt,name=challenge,proto3" json:"challenge,omitempty"` 399 // Relying party information. 400 Rp *RelyingPartyEntity `protobuf:"bytes,2,opt,name=rp,proto3" json:"rp,omitempty"` 401 // User information. 402 User *UserEntity `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` 403 // Desired properties for the credential to be created, from most to least 404 // preferred. 405 CredentialParameters []*CredentialParameter `protobuf:"bytes,4,rep,name=credential_parameters,json=credentialParameters,proto3" json:"credential_parameters,omitempty"` 406 // Timeout in milliseconds. 407 TimeoutMs int64 `protobuf:"varint,5,opt,name=timeout_ms,json=timeoutMs,proto3" json:"timeout_ms,omitempty"` 408 // Credentials excluded from the ceremony. 409 ExcludeCredentials []*CredentialDescriptor `protobuf:"bytes,6,rep,name=exclude_credentials,json=excludeCredentials,proto3" json:"exclude_credentials,omitempty"` 410 // Attestation requested, defaulting to "none". 411 // https://www.w3.org/TR/webauthn-2/#enumdef-attestationconveyancepreference. 412 Attestation string `protobuf:"bytes,7,opt,name=attestation,proto3" json:"attestation,omitempty"` 413 // Extensions supplied by the Relying Party. 414 Extensions *AuthenticationExtensionsClientInputs `protobuf:"bytes,8,opt,name=extensions,proto3" json:"extensions,omitempty"` 415 // Authenticator selection criteria for the new credential. 416 AuthenticatorSelection *AuthenticatorSelection `protobuf:"bytes,9,opt,name=authenticator_selection,json=authenticatorSelection,proto3" json:"authenticator_selection,omitempty"` 417 XXX_NoUnkeyedLiteral struct{} `json:"-"` 418 XXX_unrecognized []byte `json:"-"` 419 XXX_sizecache int32 `json:"-"` 420 } 421 422 func (m *PublicKeyCredentialCreationOptions) Reset() { *m = PublicKeyCredentialCreationOptions{} } 423 func (m *PublicKeyCredentialCreationOptions) String() string { return proto.CompactTextString(m) } 424 func (*PublicKeyCredentialCreationOptions) ProtoMessage() {} 425 func (*PublicKeyCredentialCreationOptions) Descriptor() ([]byte, []int) { 426 return fileDescriptor_0d490a6db28e8798, []int{5} 427 } 428 func (m *PublicKeyCredentialCreationOptions) XXX_Unmarshal(b []byte) error { 429 return m.Unmarshal(b) 430 } 431 func (m *PublicKeyCredentialCreationOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 432 if deterministic { 433 return xxx_messageInfo_PublicKeyCredentialCreationOptions.Marshal(b, m, deterministic) 434 } else { 435 b = b[:cap(b)] 436 n, err := m.MarshalToSizedBuffer(b) 437 if err != nil { 438 return nil, err 439 } 440 return b[:n], nil 441 } 442 } 443 func (m *PublicKeyCredentialCreationOptions) XXX_Merge(src proto.Message) { 444 xxx_messageInfo_PublicKeyCredentialCreationOptions.Merge(m, src) 445 } 446 func (m *PublicKeyCredentialCreationOptions) XXX_Size() int { 447 return m.Size() 448 } 449 func (m *PublicKeyCredentialCreationOptions) XXX_DiscardUnknown() { 450 xxx_messageInfo_PublicKeyCredentialCreationOptions.DiscardUnknown(m) 451 } 452 453 var xxx_messageInfo_PublicKeyCredentialCreationOptions proto.InternalMessageInfo 454 455 func (m *PublicKeyCredentialCreationOptions) GetChallenge() []byte { 456 if m != nil { 457 return m.Challenge 458 } 459 return nil 460 } 461 462 func (m *PublicKeyCredentialCreationOptions) GetRp() *RelyingPartyEntity { 463 if m != nil { 464 return m.Rp 465 } 466 return nil 467 } 468 469 func (m *PublicKeyCredentialCreationOptions) GetUser() *UserEntity { 470 if m != nil { 471 return m.User 472 } 473 return nil 474 } 475 476 func (m *PublicKeyCredentialCreationOptions) GetCredentialParameters() []*CredentialParameter { 477 if m != nil { 478 return m.CredentialParameters 479 } 480 return nil 481 } 482 483 func (m *PublicKeyCredentialCreationOptions) GetTimeoutMs() int64 { 484 if m != nil { 485 return m.TimeoutMs 486 } 487 return 0 488 } 489 490 func (m *PublicKeyCredentialCreationOptions) GetExcludeCredentials() []*CredentialDescriptor { 491 if m != nil { 492 return m.ExcludeCredentials 493 } 494 return nil 495 } 496 497 func (m *PublicKeyCredentialCreationOptions) GetAttestation() string { 498 if m != nil { 499 return m.Attestation 500 } 501 return "" 502 } 503 504 func (m *PublicKeyCredentialCreationOptions) GetExtensions() *AuthenticationExtensionsClientInputs { 505 if m != nil { 506 return m.Extensions 507 } 508 return nil 509 } 510 511 func (m *PublicKeyCredentialCreationOptions) GetAuthenticatorSelection() *AuthenticatorSelection { 512 if m != nil { 513 return m.AuthenticatorSelection 514 } 515 return nil 516 } 517 518 // Credential creation response returned by the authenticator. 519 // Refer to navigator.credentials.create in your browser. 520 type CredentialCreationResponse struct { 521 // Type of the credential, usually "public-key". 522 Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` 523 // Raw Credential ID. 524 RawId []byte `protobuf:"bytes,2,opt,name=raw_id,json=rawId,proto3" json:"raw_id,omitempty"` 525 // Attestation response from the authenticator. 526 Response *AuthenticatorAttestationResponse `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"` 527 // Extensions supplied by the authenticator. 528 Extensions *AuthenticationExtensionsClientOutputs `protobuf:"bytes,4,opt,name=extensions,proto3" json:"extensions,omitempty"` 529 XXX_NoUnkeyedLiteral struct{} `json:"-"` 530 XXX_unrecognized []byte `json:"-"` 531 XXX_sizecache int32 `json:"-"` 532 } 533 534 func (m *CredentialCreationResponse) Reset() { *m = CredentialCreationResponse{} } 535 func (m *CredentialCreationResponse) String() string { return proto.CompactTextString(m) } 536 func (*CredentialCreationResponse) ProtoMessage() {} 537 func (*CredentialCreationResponse) Descriptor() ([]byte, []int) { 538 return fileDescriptor_0d490a6db28e8798, []int{6} 539 } 540 func (m *CredentialCreationResponse) XXX_Unmarshal(b []byte) error { 541 return m.Unmarshal(b) 542 } 543 func (m *CredentialCreationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 544 if deterministic { 545 return xxx_messageInfo_CredentialCreationResponse.Marshal(b, m, deterministic) 546 } else { 547 b = b[:cap(b)] 548 n, err := m.MarshalToSizedBuffer(b) 549 if err != nil { 550 return nil, err 551 } 552 return b[:n], nil 553 } 554 } 555 func (m *CredentialCreationResponse) XXX_Merge(src proto.Message) { 556 xxx_messageInfo_CredentialCreationResponse.Merge(m, src) 557 } 558 func (m *CredentialCreationResponse) XXX_Size() int { 559 return m.Size() 560 } 561 func (m *CredentialCreationResponse) XXX_DiscardUnknown() { 562 xxx_messageInfo_CredentialCreationResponse.DiscardUnknown(m) 563 } 564 565 var xxx_messageInfo_CredentialCreationResponse proto.InternalMessageInfo 566 567 func (m *CredentialCreationResponse) GetType() string { 568 if m != nil { 569 return m.Type 570 } 571 return "" 572 } 573 574 func (m *CredentialCreationResponse) GetRawId() []byte { 575 if m != nil { 576 return m.RawId 577 } 578 return nil 579 } 580 581 func (m *CredentialCreationResponse) GetResponse() *AuthenticatorAttestationResponse { 582 if m != nil { 583 return m.Response 584 } 585 return nil 586 } 587 588 func (m *CredentialCreationResponse) GetExtensions() *AuthenticationExtensionsClientOutputs { 589 if m != nil { 590 return m.Extensions 591 } 592 return nil 593 } 594 595 // Attestation response from the authentication, ie, the response to a 596 // credential creation request. 597 // https://www.w3.org/TR/webauthn-2/#authenticatorattestationresponse. 598 type AuthenticatorAttestationResponse struct { 599 // Raw client data JSON, exactly as signed by the authenticator. 600 // https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata. 601 ClientDataJson []byte `protobuf:"bytes,1,opt,name=client_data_json,json=clientDataJson,proto3" json:"client_data_json,omitempty"` 602 // Raw attestation object. 603 // https://www.w3.org/TR/webauthn-2/#attestation-object 604 AttestationObject []byte `protobuf:"bytes,2,opt,name=attestation_object,json=attestationObject,proto3" json:"attestation_object,omitempty"` 605 XXX_NoUnkeyedLiteral struct{} `json:"-"` 606 XXX_unrecognized []byte `json:"-"` 607 XXX_sizecache int32 `json:"-"` 608 } 609 610 func (m *AuthenticatorAttestationResponse) Reset() { *m = AuthenticatorAttestationResponse{} } 611 func (m *AuthenticatorAttestationResponse) String() string { return proto.CompactTextString(m) } 612 func (*AuthenticatorAttestationResponse) ProtoMessage() {} 613 func (*AuthenticatorAttestationResponse) Descriptor() ([]byte, []int) { 614 return fileDescriptor_0d490a6db28e8798, []int{7} 615 } 616 func (m *AuthenticatorAttestationResponse) XXX_Unmarshal(b []byte) error { 617 return m.Unmarshal(b) 618 } 619 func (m *AuthenticatorAttestationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 620 if deterministic { 621 return xxx_messageInfo_AuthenticatorAttestationResponse.Marshal(b, m, deterministic) 622 } else { 623 b = b[:cap(b)] 624 n, err := m.MarshalToSizedBuffer(b) 625 if err != nil { 626 return nil, err 627 } 628 return b[:n], nil 629 } 630 } 631 func (m *AuthenticatorAttestationResponse) XXX_Merge(src proto.Message) { 632 xxx_messageInfo_AuthenticatorAttestationResponse.Merge(m, src) 633 } 634 func (m *AuthenticatorAttestationResponse) XXX_Size() int { 635 return m.Size() 636 } 637 func (m *AuthenticatorAttestationResponse) XXX_DiscardUnknown() { 638 xxx_messageInfo_AuthenticatorAttestationResponse.DiscardUnknown(m) 639 } 640 641 var xxx_messageInfo_AuthenticatorAttestationResponse proto.InternalMessageInfo 642 643 func (m *AuthenticatorAttestationResponse) GetClientDataJson() []byte { 644 if m != nil { 645 return m.ClientDataJson 646 } 647 return nil 648 } 649 650 func (m *AuthenticatorAttestationResponse) GetAttestationObject() []byte { 651 if m != nil { 652 return m.AttestationObject 653 } 654 return nil 655 } 656 657 // Extensions supplied by the Relying Party during credential assertion or 658 // creation. 659 // https://www.w3.org/TR/webauthn-2/#client-extension-input 660 type AuthenticationExtensionsClientInputs struct { 661 // U2F application ID to be used by the authenticator, if any. 662 // Only available if using U2F compatibility mode. 663 // https://www.w3.org/TR/webauthn-2/#sctn-appid-extension. 664 AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` 665 XXX_NoUnkeyedLiteral struct{} `json:"-"` 666 XXX_unrecognized []byte `json:"-"` 667 XXX_sizecache int32 `json:"-"` 668 } 669 670 func (m *AuthenticationExtensionsClientInputs) Reset() { *m = AuthenticationExtensionsClientInputs{} } 671 func (m *AuthenticationExtensionsClientInputs) String() string { return proto.CompactTextString(m) } 672 func (*AuthenticationExtensionsClientInputs) ProtoMessage() {} 673 func (*AuthenticationExtensionsClientInputs) Descriptor() ([]byte, []int) { 674 return fileDescriptor_0d490a6db28e8798, []int{8} 675 } 676 func (m *AuthenticationExtensionsClientInputs) XXX_Unmarshal(b []byte) error { 677 return m.Unmarshal(b) 678 } 679 func (m *AuthenticationExtensionsClientInputs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 680 if deterministic { 681 return xxx_messageInfo_AuthenticationExtensionsClientInputs.Marshal(b, m, deterministic) 682 } else { 683 b = b[:cap(b)] 684 n, err := m.MarshalToSizedBuffer(b) 685 if err != nil { 686 return nil, err 687 } 688 return b[:n], nil 689 } 690 } 691 func (m *AuthenticationExtensionsClientInputs) XXX_Merge(src proto.Message) { 692 xxx_messageInfo_AuthenticationExtensionsClientInputs.Merge(m, src) 693 } 694 func (m *AuthenticationExtensionsClientInputs) XXX_Size() int { 695 return m.Size() 696 } 697 func (m *AuthenticationExtensionsClientInputs) XXX_DiscardUnknown() { 698 xxx_messageInfo_AuthenticationExtensionsClientInputs.DiscardUnknown(m) 699 } 700 701 var xxx_messageInfo_AuthenticationExtensionsClientInputs proto.InternalMessageInfo 702 703 func (m *AuthenticationExtensionsClientInputs) GetAppId() string { 704 if m != nil { 705 return m.AppId 706 } 707 return "" 708 } 709 710 // Extensions supplied by the authenticator to the Relying Party, during 711 // credential assertion or creation. 712 // https://www.w3.org/TR/webauthn-2/#client-extension-output. 713 type AuthenticationExtensionsClientOutputs struct { 714 // If true, the AppID extension was used by the authenticator, which changes 715 // the rpIdHash accordingly. 716 // https://www.w3.org/TR/webauthn-2/#sctn-appid-extension. 717 AppId bool `protobuf:"varint,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` 718 XXX_NoUnkeyedLiteral struct{} `json:"-"` 719 XXX_unrecognized []byte `json:"-"` 720 XXX_sizecache int32 `json:"-"` 721 } 722 723 func (m *AuthenticationExtensionsClientOutputs) Reset() { *m = AuthenticationExtensionsClientOutputs{} } 724 func (m *AuthenticationExtensionsClientOutputs) String() string { return proto.CompactTextString(m) } 725 func (*AuthenticationExtensionsClientOutputs) ProtoMessage() {} 726 func (*AuthenticationExtensionsClientOutputs) Descriptor() ([]byte, []int) { 727 return fileDescriptor_0d490a6db28e8798, []int{9} 728 } 729 func (m *AuthenticationExtensionsClientOutputs) XXX_Unmarshal(b []byte) error { 730 return m.Unmarshal(b) 731 } 732 func (m *AuthenticationExtensionsClientOutputs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 733 if deterministic { 734 return xxx_messageInfo_AuthenticationExtensionsClientOutputs.Marshal(b, m, deterministic) 735 } else { 736 b = b[:cap(b)] 737 n, err := m.MarshalToSizedBuffer(b) 738 if err != nil { 739 return nil, err 740 } 741 return b[:n], nil 742 } 743 } 744 func (m *AuthenticationExtensionsClientOutputs) XXX_Merge(src proto.Message) { 745 xxx_messageInfo_AuthenticationExtensionsClientOutputs.Merge(m, src) 746 } 747 func (m *AuthenticationExtensionsClientOutputs) XXX_Size() int { 748 return m.Size() 749 } 750 func (m *AuthenticationExtensionsClientOutputs) XXX_DiscardUnknown() { 751 xxx_messageInfo_AuthenticationExtensionsClientOutputs.DiscardUnknown(m) 752 } 753 754 var xxx_messageInfo_AuthenticationExtensionsClientOutputs proto.InternalMessageInfo 755 756 func (m *AuthenticationExtensionsClientOutputs) GetAppId() bool { 757 if m != nil { 758 return m.AppId 759 } 760 return false 761 } 762 763 // Authenticator selection criteria. 764 // Restricts the choice of authenticator for credential creation. 765 type AuthenticatorSelection struct { 766 // Authenticator attachment, empty means no particular attachment is 767 // required. 768 AuthenticatorAttachment string `protobuf:"bytes,1,opt,name=authenticator_attachment,json=authenticatorAttachment,proto3" json:"authenticator_attachment,omitempty"` 769 // Resident key requirement, if true the authenticator must create a resident 770 // key. 771 RequireResidentKey bool `protobuf:"varint,2,opt,name=require_resident_key,json=requireResidentKey,proto3" json:"require_resident_key,omitempty"` 772 // User verification requirement for authenticators. 773 UserVerification string `protobuf:"bytes,3,opt,name=user_verification,json=userVerification,proto3" json:"user_verification,omitempty"` 774 XXX_NoUnkeyedLiteral struct{} `json:"-"` 775 XXX_unrecognized []byte `json:"-"` 776 XXX_sizecache int32 `json:"-"` 777 } 778 779 func (m *AuthenticatorSelection) Reset() { *m = AuthenticatorSelection{} } 780 func (m *AuthenticatorSelection) String() string { return proto.CompactTextString(m) } 781 func (*AuthenticatorSelection) ProtoMessage() {} 782 func (*AuthenticatorSelection) Descriptor() ([]byte, []int) { 783 return fileDescriptor_0d490a6db28e8798, []int{10} 784 } 785 func (m *AuthenticatorSelection) XXX_Unmarshal(b []byte) error { 786 return m.Unmarshal(b) 787 } 788 func (m *AuthenticatorSelection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 789 if deterministic { 790 return xxx_messageInfo_AuthenticatorSelection.Marshal(b, m, deterministic) 791 } else { 792 b = b[:cap(b)] 793 n, err := m.MarshalToSizedBuffer(b) 794 if err != nil { 795 return nil, err 796 } 797 return b[:n], nil 798 } 799 } 800 func (m *AuthenticatorSelection) XXX_Merge(src proto.Message) { 801 xxx_messageInfo_AuthenticatorSelection.Merge(m, src) 802 } 803 func (m *AuthenticatorSelection) XXX_Size() int { 804 return m.Size() 805 } 806 func (m *AuthenticatorSelection) XXX_DiscardUnknown() { 807 xxx_messageInfo_AuthenticatorSelection.DiscardUnknown(m) 808 } 809 810 var xxx_messageInfo_AuthenticatorSelection proto.InternalMessageInfo 811 812 func (m *AuthenticatorSelection) GetAuthenticatorAttachment() string { 813 if m != nil { 814 return m.AuthenticatorAttachment 815 } 816 return "" 817 } 818 819 func (m *AuthenticatorSelection) GetRequireResidentKey() bool { 820 if m != nil { 821 return m.RequireResidentKey 822 } 823 return false 824 } 825 826 func (m *AuthenticatorSelection) GetUserVerification() string { 827 if m != nil { 828 return m.UserVerification 829 } 830 return "" 831 } 832 833 // Public key credential descriptor. 834 // https://www.w3.org/TR/webauthn-2/#dictdef-publickeycredentialdescriptor. 835 type CredentialDescriptor struct { 836 // Type of the credential, usually "public-key". 837 Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` 838 // Raw Credential ID. 839 Id []byte `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` 840 XXX_NoUnkeyedLiteral struct{} `json:"-"` 841 XXX_unrecognized []byte `json:"-"` 842 XXX_sizecache int32 `json:"-"` 843 } 844 845 func (m *CredentialDescriptor) Reset() { *m = CredentialDescriptor{} } 846 func (m *CredentialDescriptor) String() string { return proto.CompactTextString(m) } 847 func (*CredentialDescriptor) ProtoMessage() {} 848 func (*CredentialDescriptor) Descriptor() ([]byte, []int) { 849 return fileDescriptor_0d490a6db28e8798, []int{11} 850 } 851 func (m *CredentialDescriptor) XXX_Unmarshal(b []byte) error { 852 return m.Unmarshal(b) 853 } 854 func (m *CredentialDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 855 if deterministic { 856 return xxx_messageInfo_CredentialDescriptor.Marshal(b, m, deterministic) 857 } else { 858 b = b[:cap(b)] 859 n, err := m.MarshalToSizedBuffer(b) 860 if err != nil { 861 return nil, err 862 } 863 return b[:n], nil 864 } 865 } 866 func (m *CredentialDescriptor) XXX_Merge(src proto.Message) { 867 xxx_messageInfo_CredentialDescriptor.Merge(m, src) 868 } 869 func (m *CredentialDescriptor) XXX_Size() int { 870 return m.Size() 871 } 872 func (m *CredentialDescriptor) XXX_DiscardUnknown() { 873 xxx_messageInfo_CredentialDescriptor.DiscardUnknown(m) 874 } 875 876 var xxx_messageInfo_CredentialDescriptor proto.InternalMessageInfo 877 878 func (m *CredentialDescriptor) GetType() string { 879 if m != nil { 880 return m.Type 881 } 882 return "" 883 } 884 885 func (m *CredentialDescriptor) GetId() []byte { 886 if m != nil { 887 return m.Id 888 } 889 return nil 890 } 891 892 // Parameters for credential creation. 893 // https://www.w3.org/TR/webauthn-2/#dictdef-publickeycredentialparameters. 894 type CredentialParameter struct { 895 // Credential type, usually "public-key". 896 // https://www.w3.org/TR/webauthn-2/#enumdef-publickeycredentialtype. 897 Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` 898 // COSE algorithm specifier. 899 // Most authenticators support exclusively ES256(-7). 900 // https://www.w3.org/TR/webauthn-2/#typedefdef-cosealgorithmidentifier. 901 Alg int32 `protobuf:"varint,2,opt,name=alg,proto3" json:"alg,omitempty"` 902 XXX_NoUnkeyedLiteral struct{} `json:"-"` 903 XXX_unrecognized []byte `json:"-"` 904 XXX_sizecache int32 `json:"-"` 905 } 906 907 func (m *CredentialParameter) Reset() { *m = CredentialParameter{} } 908 func (m *CredentialParameter) String() string { return proto.CompactTextString(m) } 909 func (*CredentialParameter) ProtoMessage() {} 910 func (*CredentialParameter) Descriptor() ([]byte, []int) { 911 return fileDescriptor_0d490a6db28e8798, []int{12} 912 } 913 func (m *CredentialParameter) XXX_Unmarshal(b []byte) error { 914 return m.Unmarshal(b) 915 } 916 func (m *CredentialParameter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 917 if deterministic { 918 return xxx_messageInfo_CredentialParameter.Marshal(b, m, deterministic) 919 } else { 920 b = b[:cap(b)] 921 n, err := m.MarshalToSizedBuffer(b) 922 if err != nil { 923 return nil, err 924 } 925 return b[:n], nil 926 } 927 } 928 func (m *CredentialParameter) XXX_Merge(src proto.Message) { 929 xxx_messageInfo_CredentialParameter.Merge(m, src) 930 } 931 func (m *CredentialParameter) XXX_Size() int { 932 return m.Size() 933 } 934 func (m *CredentialParameter) XXX_DiscardUnknown() { 935 xxx_messageInfo_CredentialParameter.DiscardUnknown(m) 936 } 937 938 var xxx_messageInfo_CredentialParameter proto.InternalMessageInfo 939 940 func (m *CredentialParameter) GetType() string { 941 if m != nil { 942 return m.Type 943 } 944 return "" 945 } 946 947 func (m *CredentialParameter) GetAlg() int32 { 948 if m != nil { 949 return m.Alg 950 } 951 return 0 952 } 953 954 // Relying Party information. 955 // See https://www.w3.org/TR/webauthn-2/#dictdef-publickeycredentialrpentity and 956 // https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredentialCreationOptions/rp. 957 type RelyingPartyEntity struct { 958 Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 959 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` 960 XXX_NoUnkeyedLiteral struct{} `json:"-"` 961 XXX_unrecognized []byte `json:"-"` 962 XXX_sizecache int32 `json:"-"` 963 } 964 965 func (m *RelyingPartyEntity) Reset() { *m = RelyingPartyEntity{} } 966 func (m *RelyingPartyEntity) String() string { return proto.CompactTextString(m) } 967 func (*RelyingPartyEntity) ProtoMessage() {} 968 func (*RelyingPartyEntity) Descriptor() ([]byte, []int) { 969 return fileDescriptor_0d490a6db28e8798, []int{13} 970 } 971 func (m *RelyingPartyEntity) XXX_Unmarshal(b []byte) error { 972 return m.Unmarshal(b) 973 } 974 func (m *RelyingPartyEntity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 975 if deterministic { 976 return xxx_messageInfo_RelyingPartyEntity.Marshal(b, m, deterministic) 977 } else { 978 b = b[:cap(b)] 979 n, err := m.MarshalToSizedBuffer(b) 980 if err != nil { 981 return nil, err 982 } 983 return b[:n], nil 984 } 985 } 986 func (m *RelyingPartyEntity) XXX_Merge(src proto.Message) { 987 xxx_messageInfo_RelyingPartyEntity.Merge(m, src) 988 } 989 func (m *RelyingPartyEntity) XXX_Size() int { 990 return m.Size() 991 } 992 func (m *RelyingPartyEntity) XXX_DiscardUnknown() { 993 xxx_messageInfo_RelyingPartyEntity.DiscardUnknown(m) 994 } 995 996 var xxx_messageInfo_RelyingPartyEntity proto.InternalMessageInfo 997 998 func (m *RelyingPartyEntity) GetId() string { 999 if m != nil { 1000 return m.Id 1001 } 1002 return "" 1003 } 1004 1005 func (m *RelyingPartyEntity) GetName() string { 1006 if m != nil { 1007 return m.Name 1008 } 1009 return "" 1010 } 1011 1012 // User information. 1013 // See https://www.w3.org/TR/webauthn-2/#dictdef-publickeycredentialuserentity 1014 // and 1015 // https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredentialCreationOptions/user. 1016 type UserEntity struct { 1017 // Raw ID of the user. 1018 Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 1019 // Human-palatable name for a user account. 1020 // The Relying Party _may_ let the user choose this value. 1021 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` 1022 // Human-palatable name for the user account, intended only for display. 1023 // The Relying Party _should_ let the user choose this value. 1024 DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` 1025 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1026 XXX_unrecognized []byte `json:"-"` 1027 XXX_sizecache int32 `json:"-"` 1028 } 1029 1030 func (m *UserEntity) Reset() { *m = UserEntity{} } 1031 func (m *UserEntity) String() string { return proto.CompactTextString(m) } 1032 func (*UserEntity) ProtoMessage() {} 1033 func (*UserEntity) Descriptor() ([]byte, []int) { 1034 return fileDescriptor_0d490a6db28e8798, []int{14} 1035 } 1036 func (m *UserEntity) XXX_Unmarshal(b []byte) error { 1037 return m.Unmarshal(b) 1038 } 1039 func (m *UserEntity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1040 if deterministic { 1041 return xxx_messageInfo_UserEntity.Marshal(b, m, deterministic) 1042 } else { 1043 b = b[:cap(b)] 1044 n, err := m.MarshalToSizedBuffer(b) 1045 if err != nil { 1046 return nil, err 1047 } 1048 return b[:n], nil 1049 } 1050 } 1051 func (m *UserEntity) XXX_Merge(src proto.Message) { 1052 xxx_messageInfo_UserEntity.Merge(m, src) 1053 } 1054 func (m *UserEntity) XXX_Size() int { 1055 return m.Size() 1056 } 1057 func (m *UserEntity) XXX_DiscardUnknown() { 1058 xxx_messageInfo_UserEntity.DiscardUnknown(m) 1059 } 1060 1061 var xxx_messageInfo_UserEntity proto.InternalMessageInfo 1062 1063 func (m *UserEntity) GetId() []byte { 1064 if m != nil { 1065 return m.Id 1066 } 1067 return nil 1068 } 1069 1070 func (m *UserEntity) GetName() string { 1071 if m != nil { 1072 return m.Name 1073 } 1074 return "" 1075 } 1076 1077 func (m *UserEntity) GetDisplayName() string { 1078 if m != nil { 1079 return m.DisplayName 1080 } 1081 return "" 1082 } 1083 1084 func init() { 1085 proto.RegisterType((*CredentialAssertion)(nil), "webauthn.CredentialAssertion") 1086 proto.RegisterType((*PublicKeyCredentialRequestOptions)(nil), "webauthn.PublicKeyCredentialRequestOptions") 1087 proto.RegisterType((*CredentialAssertionResponse)(nil), "webauthn.CredentialAssertionResponse") 1088 proto.RegisterType((*AuthenticatorAssertionResponse)(nil), "webauthn.AuthenticatorAssertionResponse") 1089 proto.RegisterType((*CredentialCreation)(nil), "webauthn.CredentialCreation") 1090 proto.RegisterType((*PublicKeyCredentialCreationOptions)(nil), "webauthn.PublicKeyCredentialCreationOptions") 1091 proto.RegisterType((*CredentialCreationResponse)(nil), "webauthn.CredentialCreationResponse") 1092 proto.RegisterType((*AuthenticatorAttestationResponse)(nil), "webauthn.AuthenticatorAttestationResponse") 1093 proto.RegisterType((*AuthenticationExtensionsClientInputs)(nil), "webauthn.AuthenticationExtensionsClientInputs") 1094 proto.RegisterType((*AuthenticationExtensionsClientOutputs)(nil), "webauthn.AuthenticationExtensionsClientOutputs") 1095 proto.RegisterType((*AuthenticatorSelection)(nil), "webauthn.AuthenticatorSelection") 1096 proto.RegisterType((*CredentialDescriptor)(nil), "webauthn.CredentialDescriptor") 1097 proto.RegisterType((*CredentialParameter)(nil), "webauthn.CredentialParameter") 1098 proto.RegisterType((*RelyingPartyEntity)(nil), "webauthn.RelyingPartyEntity") 1099 proto.RegisterType((*UserEntity)(nil), "webauthn.UserEntity") 1100 } 1101 1102 func init() { 1103 proto.RegisterFile("teleport/legacy/types/webauthn/webauthn.proto", fileDescriptor_0d490a6db28e8798) 1104 } 1105 1106 var fileDescriptor_0d490a6db28e8798 = []byte{ 1107 // 944 bytes of a gzipped FileDescriptorProto 1108 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xdf, 0x8f, 0xdb, 0xc4, 1109 0x13, 0x97, 0x13, 0xe7, 0xbe, 0xc9, 0x24, 0xaa, 0x72, 0x7b, 0x69, 0xbf, 0x51, 0x69, 0x43, 0x6a, 1110 0x81, 0x14, 0xd1, 0xf6, 0x82, 0x8e, 0x27, 0xa8, 0x00, 0x1d, 0x77, 0x45, 0xdc, 0x9d, 0xda, 0x9c, 1111 0x16, 0x81, 0x04, 0x2f, 0xd6, 0xc6, 0x1e, 0x92, 0x2d, 0x8e, 0xbd, 0xdd, 0x5d, 0xf7, 0x6a, 0xf1, 1112 0x27, 0xf1, 0xc6, 0x13, 0x6f, 0xbc, 0xf2, 0xc8, 0x7f, 0x40, 0x75, 0x7f, 0x09, 0xf2, 0xda, 0xb1, 1113 0xf3, 0xc3, 0xd7, 0x3b, 0x40, 0xe2, 0x6d, 0x3d, 0x33, 0x9f, 0x99, 0xdd, 0xcf, 0xce, 0x67, 0xbc, 1114 0xf0, 0x58, 0x63, 0x80, 0x22, 0x92, 0x7a, 0x1c, 0xe0, 0x8c, 0x79, 0xc9, 0x58, 0x27, 0x02, 0xd5, 1115 0xf8, 0x02, 0xa7, 0x2c, 0xd6, 0xf3, 0xb0, 0x58, 0xec, 0x0b, 0x19, 0xe9, 0x88, 0x34, 0x97, 0xdf, 1116 0x77, 0x7b, 0xb3, 0x68, 0x16, 0x19, 0xe3, 0x38, 0x5d, 0x65, 0x7e, 0x87, 0xc1, 0xde, 0x91, 0x44, 1117 0x1f, 0x43, 0xcd, 0x59, 0x70, 0xa8, 0x14, 0x4a, 0xcd, 0xa3, 0x90, 0x9c, 0x02, 0x88, 0x78, 0x1a, 1118 0x70, 0xcf, 0xfd, 0x11, 0x93, 0xbe, 0x35, 0xb4, 0x46, 0xed, 0x83, 0x87, 0xfb, 0x45, 0xee, 0x73, 1119 0xe3, 0x3b, 0xc3, 0xa4, 0xc4, 0x52, 0x7c, 0x19, 0xa3, 0xd2, 0x13, 0x91, 0xe2, 0x15, 0x6d, 0x89, 1120 0x65, 0x88, 0xf3, 0x5b, 0x0d, 0x1e, 0x5c, 0x0b, 0x20, 0xf7, 0xa0, 0xe5, 0xcd, 0x59, 0x10, 0x60, 1121 0x38, 0x43, 0x53, 0xb0, 0x43, 0x4b, 0x03, 0xb9, 0x0f, 0xa0, 0xf9, 0x02, 0xa3, 0x58, 0xbb, 0x0b, 1122 0xd5, 0xaf, 0x0d, 0xad, 0x51, 0x9d, 0xb6, 0x72, 0xcb, 0x33, 0x45, 0xf6, 0xa0, 0x21, 0x85, 0xcb, 1123 0xfd, 0x7e, 0x7d, 0x68, 0x8d, 0x5a, 0xd4, 0x96, 0xe2, 0xc4, 0x27, 0x67, 0xb0, 0xcb, 0x82, 0x20, 1124 0xba, 0x70, 0xbd, 0xa2, 0xa6, 0xea, 0xdb, 0xc3, 0xfa, 0xa8, 0x7d, 0x30, 0x28, 0x8f, 0x52, 0x6e, 1125 0xe8, 0x18, 0x95, 0x27, 0xb9, 0xd0, 0x91, 0xa4, 0x5d, 0x03, 0x2c, 0x5d, 0x8a, 0x3c, 0x07, 0xc0, 1126 0xd7, 0x1a, 0x43, 0x95, 0x6e, 0xb6, 0xdf, 0x30, 0x84, 0xec, 0x97, 0x59, 0x0e, 0x63, 0x3d, 0x4f, 1127 0x43, 0x3d, 0x96, 0x9e, 0xe6, 0x69, 0x11, 0x79, 0x14, 0x70, 0x0c, 0xf5, 0x49, 0x28, 0x62, 0xad, 1128 0xe8, 0x4a, 0x06, 0xf2, 0x10, 0x76, 0x63, 0x85, 0xd2, 0x7d, 0x85, 0x92, 0xff, 0x90, 0xc3, 0xfa, 1129 0x3b, 0x66, 0xf7, 0xdd, 0xd4, 0xf1, 0xed, 0x8a, 0xdd, 0xf9, 0xd3, 0x82, 0x77, 0x2a, 0x6e, 0x89, 1130 0xa2, 0x12, 0x51, 0xa8, 0x90, 0x10, 0xb0, 0xd3, 0x2e, 0x30, 0xb4, 0xb5, 0xa8, 0x59, 0x93, 0xdb, 1131 0xb0, 0x23, 0xd9, 0x45, 0xca, 0x49, 0xcd, 0x90, 0xd9, 0x90, 0xec, 0xe2, 0xc4, 0x27, 0xc7, 0xd0, 1132 0x94, 0x39, 0xcc, 0x90, 0xd5, 0x3e, 0x18, 0x55, 0x9e, 0x22, 0x92, 0x5b, 0x65, 0x68, 0x81, 0x24, 1133 0x93, 0x35, 0x36, 0x6c, 0x93, 0x67, 0x7c, 0x53, 0x36, 0x26, 0xb1, 0xde, 0xa4, 0xc3, 0xf9, 0xd5, 1134 0x82, 0xc1, 0xdb, 0xab, 0x93, 0x11, 0x74, 0x3d, 0x83, 0x77, 0x7d, 0xa6, 0x99, 0xfb, 0x42, 0x45, 1135 0x61, 0xde, 0x27, 0xb7, 0x32, 0xfb, 0x31, 0xd3, 0xec, 0x54, 0x45, 0x21, 0x79, 0x0c, 0x84, 0xad, 1136 0xe6, 0x32, 0x80, 0x9c, 0x86, 0xdd, 0x35, 0x4f, 0x0a, 0x49, 0x3b, 0x4f, 0xf1, 0x59, 0xc8, 0x74, 1137 0x2c, 0x33, 0x4e, 0x3a, 0xb4, 0x34, 0x90, 0x77, 0xa1, 0x6d, 0x2e, 0x6a, 0xce, 0x42, 0x3f, 0x40, 1138 0x73, 0xd6, 0x0e, 0x85, 0xd4, 0xf4, 0x95, 0xb1, 0x38, 0x0c, 0x48, 0x79, 0x37, 0x47, 0x12, 0xcd, 1139 0x99, 0xc9, 0x59, 0x85, 0x80, 0x1e, 0xbd, 0x55, 0x40, 0x4b, 0x68, 0x85, 0x82, 0x7e, 0xb6, 0xc1, 1140 0xb9, 0x1e, 0x71, 0x8d, 0x84, 0x1e, 0x41, 0x4d, 0x0a, 0xc3, 0x42, 0xfb, 0xe0, 0x5e, 0xb9, 0x13, 1141 0x8a, 0x41, 0xc2, 0xc3, 0xd9, 0x39, 0x93, 0x3a, 0x79, 0x1a, 0x6a, 0xae, 0x13, 0x5a, 0x93, 0x82, 1142 0x8c, 0xc0, 0x4e, 0xcf, 0x98, 0xf7, 0x48, 0xaf, 0x8c, 0xff, 0x46, 0xa1, 0xcc, 0xe3, 0x4c, 0x04, 1143 0xa1, 0x70, 0xbb, 0x14, 0x98, 0x2b, 0x98, 0x64, 0x0b, 0xd4, 0x28, 0x97, 0x52, 0xbb, 0x5f, 0x25, 1144 0xb5, 0xf3, 0x65, 0x14, 0xed, 0x79, 0xdb, 0x46, 0xb5, 0x21, 0xf7, 0xc6, 0xa6, 0xdc, 0x27, 0xb0, 1145 0x87, 0xaf, 0xbd, 0x20, 0xf6, 0x71, 0x4d, 0xdb, 0x3b, 0x37, 0xd2, 0x36, 0xc9, 0xa1, 0xab, 0xea, 1146 0x1e, 0x42, 0x9b, 0x69, 0x8d, 0x4a, 0x67, 0x3a, 0xfc, 0x9f, 0xd1, 0xd1, 0xaa, 0x69, 0x43, 0xff, 1147 0xcd, 0x7f, 0xad, 0xff, 0xef, 0xe0, 0xff, 0xeb, 0x3d, 0xaa, 0x30, 0x40, 0xcf, 0x54, 0x6f, 0x99, 1148 0xe4, 0xc3, 0x2b, 0x64, 0xf9, 0xf5, 0x32, 0x8e, 0xde, 0x61, 0x95, 0x76, 0xe7, 0x8d, 0x05, 0x77, 1149 0xb7, 0x9b, 0xe4, 0x9f, 0x0c, 0x8b, 0x2f, 0xb7, 0x86, 0xc5, 0x07, 0x57, 0x0d, 0x8b, 0x92, 0xaa, 1150 0xff, 0x62, 0x5c, 0xfc, 0x04, 0xc3, 0xeb, 0xca, 0xff, 0xcd, 0x79, 0x51, 0x26, 0x70, 0xa3, 0xe9, 1151 0x0b, 0xf4, 0x74, 0x31, 0x2f, 0x4a, 0xcf, 0xc4, 0x38, 0x9c, 0x4f, 0xe1, 0xbd, 0x9b, 0x5c, 0x77, 1152 0x4a, 0x2a, 0x13, 0xe6, 0xaf, 0x94, 0x51, 0xdd, 0x60, 0x42, 0x9c, 0xf8, 0xce, 0x67, 0xf0, 0xfe, 1153 0x8d, 0x0e, 0xbc, 0x81, 0x6f, 0x2e, 0xf1, 0xbf, 0x58, 0x70, 0xa7, 0xba, 0x23, 0xc8, 0xc7, 0xd0, 1154 0x5f, 0x6f, 0x2a, 0xa6, 0x35, 0xf3, 0xe6, 0x0b, 0x0c, 0x75, 0xbe, 0x87, 0xf5, 0xa6, 0x3b, 0x2c, 1155 0xdc, 0xe4, 0x43, 0xe8, 0x49, 0x7c, 0x19, 0x73, 0x89, 0xae, 0x44, 0xc5, 0xd3, 0xe6, 0x31, 0x93, 1156 0xab, 0x66, 0x4a, 0x93, 0xdc, 0x47, 0x73, 0xd7, 0x19, 0x26, 0xd5, 0x7f, 0xb0, 0xfa, 0x15, 0x7f, 1157 0xb0, 0x4f, 0xa0, 0x57, 0x25, 0xc6, 0xca, 0x66, 0xbc, 0x05, 0xb5, 0xa2, 0x11, 0x6b, 0xdc, 0x77, 1158 0x9e, 0xac, 0x3e, 0x51, 0x8a, 0x21, 0x51, 0x09, 0xed, 0x42, 0x9d, 0x05, 0x33, 0x83, 0x6d, 0xd0, 1159 0x74, 0xe9, 0x1c, 0x03, 0xd9, 0x9e, 0x70, 0x79, 0x89, 0x0c, 0x59, 0xe3, 0x7e, 0x9a, 0x2b, 0x64, 1160 0x0b, 0x34, 0xc0, 0x16, 0x35, 0xeb, 0x53, 0xbb, 0x59, 0xef, 0xda, 0xd4, 0xe6, 0x5e, 0x14, 0x3a, 1161 0x2e, 0x40, 0x39, 0xf7, 0x56, 0xd0, 0x9d, 0xab, 0xd0, 0xe4, 0x01, 0x74, 0x7c, 0xae, 0x44, 0xc0, 1162 0x12, 0xd7, 0xf8, 0x32, 0x62, 0xda, 0xb9, 0xed, 0x79, 0x56, 0xc0, 0xee, 0x36, 0xb2, 0x02, 0x5f, 1163 0x3c, 0xfb, 0xfd, 0x72, 0x60, 0xfd, 0x71, 0x39, 0xb0, 0xde, 0x5c, 0x0e, 0xac, 0xef, 0x3f, 0x9f, 1164 0x71, 0x3d, 0x8f, 0xa7, 0xfb, 0x5e, 0xb4, 0x18, 0xcf, 0x24, 0x7b, 0xc5, 0xb3, 0xfe, 0x63, 0xc1, 1165 0xb8, 0x78, 0xfc, 0x31, 0xc1, 0x37, 0x5e, 0x7e, 0x4f, 0x96, 0x0b, 0x31, 0x9d, 0xee, 0x98, 0xc7, 1166 0xdd, 0x47, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x9b, 0x8b, 0x9d, 0xcf, 0x2d, 0x0a, 0x00, 0x00, 1167 } 1168 1169 func (m *CredentialAssertion) Marshal() (dAtA []byte, err error) { 1170 size := m.Size() 1171 dAtA = make([]byte, size) 1172 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1173 if err != nil { 1174 return nil, err 1175 } 1176 return dAtA[:n], nil 1177 } 1178 1179 func (m *CredentialAssertion) MarshalTo(dAtA []byte) (int, error) { 1180 size := m.Size() 1181 return m.MarshalToSizedBuffer(dAtA[:size]) 1182 } 1183 1184 func (m *CredentialAssertion) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1185 i := len(dAtA) 1186 _ = i 1187 var l int 1188 _ = l 1189 if m.XXX_unrecognized != nil { 1190 i -= len(m.XXX_unrecognized) 1191 copy(dAtA[i:], m.XXX_unrecognized) 1192 } 1193 if m.PublicKey != nil { 1194 { 1195 size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) 1196 if err != nil { 1197 return 0, err 1198 } 1199 i -= size 1200 i = encodeVarintWebauthn(dAtA, i, uint64(size)) 1201 } 1202 i-- 1203 dAtA[i] = 0xa 1204 } 1205 return len(dAtA) - i, nil 1206 } 1207 1208 func (m *PublicKeyCredentialRequestOptions) Marshal() (dAtA []byte, err error) { 1209 size := m.Size() 1210 dAtA = make([]byte, size) 1211 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1212 if err != nil { 1213 return nil, err 1214 } 1215 return dAtA[:n], nil 1216 } 1217 1218 func (m *PublicKeyCredentialRequestOptions) MarshalTo(dAtA []byte) (int, error) { 1219 size := m.Size() 1220 return m.MarshalToSizedBuffer(dAtA[:size]) 1221 } 1222 1223 func (m *PublicKeyCredentialRequestOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1224 i := len(dAtA) 1225 _ = i 1226 var l int 1227 _ = l 1228 if m.XXX_unrecognized != nil { 1229 i -= len(m.XXX_unrecognized) 1230 copy(dAtA[i:], m.XXX_unrecognized) 1231 } 1232 if len(m.UserVerification) > 0 { 1233 i -= len(m.UserVerification) 1234 copy(dAtA[i:], m.UserVerification) 1235 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.UserVerification))) 1236 i-- 1237 dAtA[i] = 0x32 1238 } 1239 if m.Extensions != nil { 1240 { 1241 size, err := m.Extensions.MarshalToSizedBuffer(dAtA[:i]) 1242 if err != nil { 1243 return 0, err 1244 } 1245 i -= size 1246 i = encodeVarintWebauthn(dAtA, i, uint64(size)) 1247 } 1248 i-- 1249 dAtA[i] = 0x2a 1250 } 1251 if len(m.AllowCredentials) > 0 { 1252 for iNdEx := len(m.AllowCredentials) - 1; iNdEx >= 0; iNdEx-- { 1253 { 1254 size, err := m.AllowCredentials[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1255 if err != nil { 1256 return 0, err 1257 } 1258 i -= size 1259 i = encodeVarintWebauthn(dAtA, i, uint64(size)) 1260 } 1261 i-- 1262 dAtA[i] = 0x22 1263 } 1264 } 1265 if len(m.RpId) > 0 { 1266 i -= len(m.RpId) 1267 copy(dAtA[i:], m.RpId) 1268 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.RpId))) 1269 i-- 1270 dAtA[i] = 0x1a 1271 } 1272 if m.TimeoutMs != 0 { 1273 i = encodeVarintWebauthn(dAtA, i, uint64(m.TimeoutMs)) 1274 i-- 1275 dAtA[i] = 0x10 1276 } 1277 if len(m.Challenge) > 0 { 1278 i -= len(m.Challenge) 1279 copy(dAtA[i:], m.Challenge) 1280 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.Challenge))) 1281 i-- 1282 dAtA[i] = 0xa 1283 } 1284 return len(dAtA) - i, nil 1285 } 1286 1287 func (m *CredentialAssertionResponse) Marshal() (dAtA []byte, err error) { 1288 size := m.Size() 1289 dAtA = make([]byte, size) 1290 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1291 if err != nil { 1292 return nil, err 1293 } 1294 return dAtA[:n], nil 1295 } 1296 1297 func (m *CredentialAssertionResponse) MarshalTo(dAtA []byte) (int, error) { 1298 size := m.Size() 1299 return m.MarshalToSizedBuffer(dAtA[:size]) 1300 } 1301 1302 func (m *CredentialAssertionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1303 i := len(dAtA) 1304 _ = i 1305 var l int 1306 _ = l 1307 if m.XXX_unrecognized != nil { 1308 i -= len(m.XXX_unrecognized) 1309 copy(dAtA[i:], m.XXX_unrecognized) 1310 } 1311 if m.Extensions != nil { 1312 { 1313 size, err := m.Extensions.MarshalToSizedBuffer(dAtA[:i]) 1314 if err != nil { 1315 return 0, err 1316 } 1317 i -= size 1318 i = encodeVarintWebauthn(dAtA, i, uint64(size)) 1319 } 1320 i-- 1321 dAtA[i] = 0x22 1322 } 1323 if m.Response != nil { 1324 { 1325 size, err := m.Response.MarshalToSizedBuffer(dAtA[:i]) 1326 if err != nil { 1327 return 0, err 1328 } 1329 i -= size 1330 i = encodeVarintWebauthn(dAtA, i, uint64(size)) 1331 } 1332 i-- 1333 dAtA[i] = 0x1a 1334 } 1335 if len(m.RawId) > 0 { 1336 i -= len(m.RawId) 1337 copy(dAtA[i:], m.RawId) 1338 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.RawId))) 1339 i-- 1340 dAtA[i] = 0x12 1341 } 1342 if len(m.Type) > 0 { 1343 i -= len(m.Type) 1344 copy(dAtA[i:], m.Type) 1345 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.Type))) 1346 i-- 1347 dAtA[i] = 0xa 1348 } 1349 return len(dAtA) - i, nil 1350 } 1351 1352 func (m *AuthenticatorAssertionResponse) Marshal() (dAtA []byte, err error) { 1353 size := m.Size() 1354 dAtA = make([]byte, size) 1355 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1356 if err != nil { 1357 return nil, err 1358 } 1359 return dAtA[:n], nil 1360 } 1361 1362 func (m *AuthenticatorAssertionResponse) MarshalTo(dAtA []byte) (int, error) { 1363 size := m.Size() 1364 return m.MarshalToSizedBuffer(dAtA[:size]) 1365 } 1366 1367 func (m *AuthenticatorAssertionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1368 i := len(dAtA) 1369 _ = i 1370 var l int 1371 _ = l 1372 if m.XXX_unrecognized != nil { 1373 i -= len(m.XXX_unrecognized) 1374 copy(dAtA[i:], m.XXX_unrecognized) 1375 } 1376 if len(m.UserHandle) > 0 { 1377 i -= len(m.UserHandle) 1378 copy(dAtA[i:], m.UserHandle) 1379 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.UserHandle))) 1380 i-- 1381 dAtA[i] = 0x22 1382 } 1383 if len(m.Signature) > 0 { 1384 i -= len(m.Signature) 1385 copy(dAtA[i:], m.Signature) 1386 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.Signature))) 1387 i-- 1388 dAtA[i] = 0x1a 1389 } 1390 if len(m.AuthenticatorData) > 0 { 1391 i -= len(m.AuthenticatorData) 1392 copy(dAtA[i:], m.AuthenticatorData) 1393 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.AuthenticatorData))) 1394 i-- 1395 dAtA[i] = 0x12 1396 } 1397 if len(m.ClientDataJson) > 0 { 1398 i -= len(m.ClientDataJson) 1399 copy(dAtA[i:], m.ClientDataJson) 1400 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.ClientDataJson))) 1401 i-- 1402 dAtA[i] = 0xa 1403 } 1404 return len(dAtA) - i, nil 1405 } 1406 1407 func (m *CredentialCreation) Marshal() (dAtA []byte, err error) { 1408 size := m.Size() 1409 dAtA = make([]byte, size) 1410 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1411 if err != nil { 1412 return nil, err 1413 } 1414 return dAtA[:n], nil 1415 } 1416 1417 func (m *CredentialCreation) MarshalTo(dAtA []byte) (int, error) { 1418 size := m.Size() 1419 return m.MarshalToSizedBuffer(dAtA[:size]) 1420 } 1421 1422 func (m *CredentialCreation) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1423 i := len(dAtA) 1424 _ = i 1425 var l int 1426 _ = l 1427 if m.XXX_unrecognized != nil { 1428 i -= len(m.XXX_unrecognized) 1429 copy(dAtA[i:], m.XXX_unrecognized) 1430 } 1431 if m.PublicKey != nil { 1432 { 1433 size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) 1434 if err != nil { 1435 return 0, err 1436 } 1437 i -= size 1438 i = encodeVarintWebauthn(dAtA, i, uint64(size)) 1439 } 1440 i-- 1441 dAtA[i] = 0xa 1442 } 1443 return len(dAtA) - i, nil 1444 } 1445 1446 func (m *PublicKeyCredentialCreationOptions) Marshal() (dAtA []byte, err error) { 1447 size := m.Size() 1448 dAtA = make([]byte, size) 1449 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1450 if err != nil { 1451 return nil, err 1452 } 1453 return dAtA[:n], nil 1454 } 1455 1456 func (m *PublicKeyCredentialCreationOptions) MarshalTo(dAtA []byte) (int, error) { 1457 size := m.Size() 1458 return m.MarshalToSizedBuffer(dAtA[:size]) 1459 } 1460 1461 func (m *PublicKeyCredentialCreationOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1462 i := len(dAtA) 1463 _ = i 1464 var l int 1465 _ = l 1466 if m.XXX_unrecognized != nil { 1467 i -= len(m.XXX_unrecognized) 1468 copy(dAtA[i:], m.XXX_unrecognized) 1469 } 1470 if m.AuthenticatorSelection != nil { 1471 { 1472 size, err := m.AuthenticatorSelection.MarshalToSizedBuffer(dAtA[:i]) 1473 if err != nil { 1474 return 0, err 1475 } 1476 i -= size 1477 i = encodeVarintWebauthn(dAtA, i, uint64(size)) 1478 } 1479 i-- 1480 dAtA[i] = 0x4a 1481 } 1482 if m.Extensions != nil { 1483 { 1484 size, err := m.Extensions.MarshalToSizedBuffer(dAtA[:i]) 1485 if err != nil { 1486 return 0, err 1487 } 1488 i -= size 1489 i = encodeVarintWebauthn(dAtA, i, uint64(size)) 1490 } 1491 i-- 1492 dAtA[i] = 0x42 1493 } 1494 if len(m.Attestation) > 0 { 1495 i -= len(m.Attestation) 1496 copy(dAtA[i:], m.Attestation) 1497 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.Attestation))) 1498 i-- 1499 dAtA[i] = 0x3a 1500 } 1501 if len(m.ExcludeCredentials) > 0 { 1502 for iNdEx := len(m.ExcludeCredentials) - 1; iNdEx >= 0; iNdEx-- { 1503 { 1504 size, err := m.ExcludeCredentials[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1505 if err != nil { 1506 return 0, err 1507 } 1508 i -= size 1509 i = encodeVarintWebauthn(dAtA, i, uint64(size)) 1510 } 1511 i-- 1512 dAtA[i] = 0x32 1513 } 1514 } 1515 if m.TimeoutMs != 0 { 1516 i = encodeVarintWebauthn(dAtA, i, uint64(m.TimeoutMs)) 1517 i-- 1518 dAtA[i] = 0x28 1519 } 1520 if len(m.CredentialParameters) > 0 { 1521 for iNdEx := len(m.CredentialParameters) - 1; iNdEx >= 0; iNdEx-- { 1522 { 1523 size, err := m.CredentialParameters[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1524 if err != nil { 1525 return 0, err 1526 } 1527 i -= size 1528 i = encodeVarintWebauthn(dAtA, i, uint64(size)) 1529 } 1530 i-- 1531 dAtA[i] = 0x22 1532 } 1533 } 1534 if m.User != nil { 1535 { 1536 size, err := m.User.MarshalToSizedBuffer(dAtA[:i]) 1537 if err != nil { 1538 return 0, err 1539 } 1540 i -= size 1541 i = encodeVarintWebauthn(dAtA, i, uint64(size)) 1542 } 1543 i-- 1544 dAtA[i] = 0x1a 1545 } 1546 if m.Rp != nil { 1547 { 1548 size, err := m.Rp.MarshalToSizedBuffer(dAtA[:i]) 1549 if err != nil { 1550 return 0, err 1551 } 1552 i -= size 1553 i = encodeVarintWebauthn(dAtA, i, uint64(size)) 1554 } 1555 i-- 1556 dAtA[i] = 0x12 1557 } 1558 if len(m.Challenge) > 0 { 1559 i -= len(m.Challenge) 1560 copy(dAtA[i:], m.Challenge) 1561 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.Challenge))) 1562 i-- 1563 dAtA[i] = 0xa 1564 } 1565 return len(dAtA) - i, nil 1566 } 1567 1568 func (m *CredentialCreationResponse) Marshal() (dAtA []byte, err error) { 1569 size := m.Size() 1570 dAtA = make([]byte, size) 1571 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1572 if err != nil { 1573 return nil, err 1574 } 1575 return dAtA[:n], nil 1576 } 1577 1578 func (m *CredentialCreationResponse) MarshalTo(dAtA []byte) (int, error) { 1579 size := m.Size() 1580 return m.MarshalToSizedBuffer(dAtA[:size]) 1581 } 1582 1583 func (m *CredentialCreationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1584 i := len(dAtA) 1585 _ = i 1586 var l int 1587 _ = l 1588 if m.XXX_unrecognized != nil { 1589 i -= len(m.XXX_unrecognized) 1590 copy(dAtA[i:], m.XXX_unrecognized) 1591 } 1592 if m.Extensions != nil { 1593 { 1594 size, err := m.Extensions.MarshalToSizedBuffer(dAtA[:i]) 1595 if err != nil { 1596 return 0, err 1597 } 1598 i -= size 1599 i = encodeVarintWebauthn(dAtA, i, uint64(size)) 1600 } 1601 i-- 1602 dAtA[i] = 0x22 1603 } 1604 if m.Response != nil { 1605 { 1606 size, err := m.Response.MarshalToSizedBuffer(dAtA[:i]) 1607 if err != nil { 1608 return 0, err 1609 } 1610 i -= size 1611 i = encodeVarintWebauthn(dAtA, i, uint64(size)) 1612 } 1613 i-- 1614 dAtA[i] = 0x1a 1615 } 1616 if len(m.RawId) > 0 { 1617 i -= len(m.RawId) 1618 copy(dAtA[i:], m.RawId) 1619 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.RawId))) 1620 i-- 1621 dAtA[i] = 0x12 1622 } 1623 if len(m.Type) > 0 { 1624 i -= len(m.Type) 1625 copy(dAtA[i:], m.Type) 1626 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.Type))) 1627 i-- 1628 dAtA[i] = 0xa 1629 } 1630 return len(dAtA) - i, nil 1631 } 1632 1633 func (m *AuthenticatorAttestationResponse) Marshal() (dAtA []byte, err error) { 1634 size := m.Size() 1635 dAtA = make([]byte, size) 1636 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1637 if err != nil { 1638 return nil, err 1639 } 1640 return dAtA[:n], nil 1641 } 1642 1643 func (m *AuthenticatorAttestationResponse) MarshalTo(dAtA []byte) (int, error) { 1644 size := m.Size() 1645 return m.MarshalToSizedBuffer(dAtA[:size]) 1646 } 1647 1648 func (m *AuthenticatorAttestationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1649 i := len(dAtA) 1650 _ = i 1651 var l int 1652 _ = l 1653 if m.XXX_unrecognized != nil { 1654 i -= len(m.XXX_unrecognized) 1655 copy(dAtA[i:], m.XXX_unrecognized) 1656 } 1657 if len(m.AttestationObject) > 0 { 1658 i -= len(m.AttestationObject) 1659 copy(dAtA[i:], m.AttestationObject) 1660 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.AttestationObject))) 1661 i-- 1662 dAtA[i] = 0x12 1663 } 1664 if len(m.ClientDataJson) > 0 { 1665 i -= len(m.ClientDataJson) 1666 copy(dAtA[i:], m.ClientDataJson) 1667 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.ClientDataJson))) 1668 i-- 1669 dAtA[i] = 0xa 1670 } 1671 return len(dAtA) - i, nil 1672 } 1673 1674 func (m *AuthenticationExtensionsClientInputs) Marshal() (dAtA []byte, err error) { 1675 size := m.Size() 1676 dAtA = make([]byte, size) 1677 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1678 if err != nil { 1679 return nil, err 1680 } 1681 return dAtA[:n], nil 1682 } 1683 1684 func (m *AuthenticationExtensionsClientInputs) MarshalTo(dAtA []byte) (int, error) { 1685 size := m.Size() 1686 return m.MarshalToSizedBuffer(dAtA[:size]) 1687 } 1688 1689 func (m *AuthenticationExtensionsClientInputs) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1690 i := len(dAtA) 1691 _ = i 1692 var l int 1693 _ = l 1694 if m.XXX_unrecognized != nil { 1695 i -= len(m.XXX_unrecognized) 1696 copy(dAtA[i:], m.XXX_unrecognized) 1697 } 1698 if len(m.AppId) > 0 { 1699 i -= len(m.AppId) 1700 copy(dAtA[i:], m.AppId) 1701 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.AppId))) 1702 i-- 1703 dAtA[i] = 0xa 1704 } 1705 return len(dAtA) - i, nil 1706 } 1707 1708 func (m *AuthenticationExtensionsClientOutputs) Marshal() (dAtA []byte, err error) { 1709 size := m.Size() 1710 dAtA = make([]byte, size) 1711 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1712 if err != nil { 1713 return nil, err 1714 } 1715 return dAtA[:n], nil 1716 } 1717 1718 func (m *AuthenticationExtensionsClientOutputs) MarshalTo(dAtA []byte) (int, error) { 1719 size := m.Size() 1720 return m.MarshalToSizedBuffer(dAtA[:size]) 1721 } 1722 1723 func (m *AuthenticationExtensionsClientOutputs) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1724 i := len(dAtA) 1725 _ = i 1726 var l int 1727 _ = l 1728 if m.XXX_unrecognized != nil { 1729 i -= len(m.XXX_unrecognized) 1730 copy(dAtA[i:], m.XXX_unrecognized) 1731 } 1732 if m.AppId { 1733 i-- 1734 if m.AppId { 1735 dAtA[i] = 1 1736 } else { 1737 dAtA[i] = 0 1738 } 1739 i-- 1740 dAtA[i] = 0x8 1741 } 1742 return len(dAtA) - i, nil 1743 } 1744 1745 func (m *AuthenticatorSelection) Marshal() (dAtA []byte, err error) { 1746 size := m.Size() 1747 dAtA = make([]byte, size) 1748 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1749 if err != nil { 1750 return nil, err 1751 } 1752 return dAtA[:n], nil 1753 } 1754 1755 func (m *AuthenticatorSelection) MarshalTo(dAtA []byte) (int, error) { 1756 size := m.Size() 1757 return m.MarshalToSizedBuffer(dAtA[:size]) 1758 } 1759 1760 func (m *AuthenticatorSelection) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1761 i := len(dAtA) 1762 _ = i 1763 var l int 1764 _ = l 1765 if m.XXX_unrecognized != nil { 1766 i -= len(m.XXX_unrecognized) 1767 copy(dAtA[i:], m.XXX_unrecognized) 1768 } 1769 if len(m.UserVerification) > 0 { 1770 i -= len(m.UserVerification) 1771 copy(dAtA[i:], m.UserVerification) 1772 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.UserVerification))) 1773 i-- 1774 dAtA[i] = 0x1a 1775 } 1776 if m.RequireResidentKey { 1777 i-- 1778 if m.RequireResidentKey { 1779 dAtA[i] = 1 1780 } else { 1781 dAtA[i] = 0 1782 } 1783 i-- 1784 dAtA[i] = 0x10 1785 } 1786 if len(m.AuthenticatorAttachment) > 0 { 1787 i -= len(m.AuthenticatorAttachment) 1788 copy(dAtA[i:], m.AuthenticatorAttachment) 1789 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.AuthenticatorAttachment))) 1790 i-- 1791 dAtA[i] = 0xa 1792 } 1793 return len(dAtA) - i, nil 1794 } 1795 1796 func (m *CredentialDescriptor) Marshal() (dAtA []byte, err error) { 1797 size := m.Size() 1798 dAtA = make([]byte, size) 1799 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1800 if err != nil { 1801 return nil, err 1802 } 1803 return dAtA[:n], nil 1804 } 1805 1806 func (m *CredentialDescriptor) MarshalTo(dAtA []byte) (int, error) { 1807 size := m.Size() 1808 return m.MarshalToSizedBuffer(dAtA[:size]) 1809 } 1810 1811 func (m *CredentialDescriptor) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1812 i := len(dAtA) 1813 _ = i 1814 var l int 1815 _ = l 1816 if m.XXX_unrecognized != nil { 1817 i -= len(m.XXX_unrecognized) 1818 copy(dAtA[i:], m.XXX_unrecognized) 1819 } 1820 if len(m.Id) > 0 { 1821 i -= len(m.Id) 1822 copy(dAtA[i:], m.Id) 1823 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.Id))) 1824 i-- 1825 dAtA[i] = 0x12 1826 } 1827 if len(m.Type) > 0 { 1828 i -= len(m.Type) 1829 copy(dAtA[i:], m.Type) 1830 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.Type))) 1831 i-- 1832 dAtA[i] = 0xa 1833 } 1834 return len(dAtA) - i, nil 1835 } 1836 1837 func (m *CredentialParameter) Marshal() (dAtA []byte, err error) { 1838 size := m.Size() 1839 dAtA = make([]byte, size) 1840 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1841 if err != nil { 1842 return nil, err 1843 } 1844 return dAtA[:n], nil 1845 } 1846 1847 func (m *CredentialParameter) MarshalTo(dAtA []byte) (int, error) { 1848 size := m.Size() 1849 return m.MarshalToSizedBuffer(dAtA[:size]) 1850 } 1851 1852 func (m *CredentialParameter) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1853 i := len(dAtA) 1854 _ = i 1855 var l int 1856 _ = l 1857 if m.XXX_unrecognized != nil { 1858 i -= len(m.XXX_unrecognized) 1859 copy(dAtA[i:], m.XXX_unrecognized) 1860 } 1861 if m.Alg != 0 { 1862 i = encodeVarintWebauthn(dAtA, i, uint64(m.Alg)) 1863 i-- 1864 dAtA[i] = 0x10 1865 } 1866 if len(m.Type) > 0 { 1867 i -= len(m.Type) 1868 copy(dAtA[i:], m.Type) 1869 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.Type))) 1870 i-- 1871 dAtA[i] = 0xa 1872 } 1873 return len(dAtA) - i, nil 1874 } 1875 1876 func (m *RelyingPartyEntity) Marshal() (dAtA []byte, err error) { 1877 size := m.Size() 1878 dAtA = make([]byte, size) 1879 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1880 if err != nil { 1881 return nil, err 1882 } 1883 return dAtA[:n], nil 1884 } 1885 1886 func (m *RelyingPartyEntity) MarshalTo(dAtA []byte) (int, error) { 1887 size := m.Size() 1888 return m.MarshalToSizedBuffer(dAtA[:size]) 1889 } 1890 1891 func (m *RelyingPartyEntity) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1892 i := len(dAtA) 1893 _ = i 1894 var l int 1895 _ = l 1896 if m.XXX_unrecognized != nil { 1897 i -= len(m.XXX_unrecognized) 1898 copy(dAtA[i:], m.XXX_unrecognized) 1899 } 1900 if len(m.Name) > 0 { 1901 i -= len(m.Name) 1902 copy(dAtA[i:], m.Name) 1903 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.Name))) 1904 i-- 1905 dAtA[i] = 0x12 1906 } 1907 if len(m.Id) > 0 { 1908 i -= len(m.Id) 1909 copy(dAtA[i:], m.Id) 1910 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.Id))) 1911 i-- 1912 dAtA[i] = 0xa 1913 } 1914 return len(dAtA) - i, nil 1915 } 1916 1917 func (m *UserEntity) Marshal() (dAtA []byte, err error) { 1918 size := m.Size() 1919 dAtA = make([]byte, size) 1920 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1921 if err != nil { 1922 return nil, err 1923 } 1924 return dAtA[:n], nil 1925 } 1926 1927 func (m *UserEntity) MarshalTo(dAtA []byte) (int, error) { 1928 size := m.Size() 1929 return m.MarshalToSizedBuffer(dAtA[:size]) 1930 } 1931 1932 func (m *UserEntity) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1933 i := len(dAtA) 1934 _ = i 1935 var l int 1936 _ = l 1937 if m.XXX_unrecognized != nil { 1938 i -= len(m.XXX_unrecognized) 1939 copy(dAtA[i:], m.XXX_unrecognized) 1940 } 1941 if len(m.DisplayName) > 0 { 1942 i -= len(m.DisplayName) 1943 copy(dAtA[i:], m.DisplayName) 1944 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.DisplayName))) 1945 i-- 1946 dAtA[i] = 0x1a 1947 } 1948 if len(m.Name) > 0 { 1949 i -= len(m.Name) 1950 copy(dAtA[i:], m.Name) 1951 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.Name))) 1952 i-- 1953 dAtA[i] = 0x12 1954 } 1955 if len(m.Id) > 0 { 1956 i -= len(m.Id) 1957 copy(dAtA[i:], m.Id) 1958 i = encodeVarintWebauthn(dAtA, i, uint64(len(m.Id))) 1959 i-- 1960 dAtA[i] = 0xa 1961 } 1962 return len(dAtA) - i, nil 1963 } 1964 1965 func encodeVarintWebauthn(dAtA []byte, offset int, v uint64) int { 1966 offset -= sovWebauthn(v) 1967 base := offset 1968 for v >= 1<<7 { 1969 dAtA[offset] = uint8(v&0x7f | 0x80) 1970 v >>= 7 1971 offset++ 1972 } 1973 dAtA[offset] = uint8(v) 1974 return base 1975 } 1976 func (m *CredentialAssertion) Size() (n int) { 1977 if m == nil { 1978 return 0 1979 } 1980 var l int 1981 _ = l 1982 if m.PublicKey != nil { 1983 l = m.PublicKey.Size() 1984 n += 1 + l + sovWebauthn(uint64(l)) 1985 } 1986 if m.XXX_unrecognized != nil { 1987 n += len(m.XXX_unrecognized) 1988 } 1989 return n 1990 } 1991 1992 func (m *PublicKeyCredentialRequestOptions) Size() (n int) { 1993 if m == nil { 1994 return 0 1995 } 1996 var l int 1997 _ = l 1998 l = len(m.Challenge) 1999 if l > 0 { 2000 n += 1 + l + sovWebauthn(uint64(l)) 2001 } 2002 if m.TimeoutMs != 0 { 2003 n += 1 + sovWebauthn(uint64(m.TimeoutMs)) 2004 } 2005 l = len(m.RpId) 2006 if l > 0 { 2007 n += 1 + l + sovWebauthn(uint64(l)) 2008 } 2009 if len(m.AllowCredentials) > 0 { 2010 for _, e := range m.AllowCredentials { 2011 l = e.Size() 2012 n += 1 + l + sovWebauthn(uint64(l)) 2013 } 2014 } 2015 if m.Extensions != nil { 2016 l = m.Extensions.Size() 2017 n += 1 + l + sovWebauthn(uint64(l)) 2018 } 2019 l = len(m.UserVerification) 2020 if l > 0 { 2021 n += 1 + l + sovWebauthn(uint64(l)) 2022 } 2023 if m.XXX_unrecognized != nil { 2024 n += len(m.XXX_unrecognized) 2025 } 2026 return n 2027 } 2028 2029 func (m *CredentialAssertionResponse) Size() (n int) { 2030 if m == nil { 2031 return 0 2032 } 2033 var l int 2034 _ = l 2035 l = len(m.Type) 2036 if l > 0 { 2037 n += 1 + l + sovWebauthn(uint64(l)) 2038 } 2039 l = len(m.RawId) 2040 if l > 0 { 2041 n += 1 + l + sovWebauthn(uint64(l)) 2042 } 2043 if m.Response != nil { 2044 l = m.Response.Size() 2045 n += 1 + l + sovWebauthn(uint64(l)) 2046 } 2047 if m.Extensions != nil { 2048 l = m.Extensions.Size() 2049 n += 1 + l + sovWebauthn(uint64(l)) 2050 } 2051 if m.XXX_unrecognized != nil { 2052 n += len(m.XXX_unrecognized) 2053 } 2054 return n 2055 } 2056 2057 func (m *AuthenticatorAssertionResponse) Size() (n int) { 2058 if m == nil { 2059 return 0 2060 } 2061 var l int 2062 _ = l 2063 l = len(m.ClientDataJson) 2064 if l > 0 { 2065 n += 1 + l + sovWebauthn(uint64(l)) 2066 } 2067 l = len(m.AuthenticatorData) 2068 if l > 0 { 2069 n += 1 + l + sovWebauthn(uint64(l)) 2070 } 2071 l = len(m.Signature) 2072 if l > 0 { 2073 n += 1 + l + sovWebauthn(uint64(l)) 2074 } 2075 l = len(m.UserHandle) 2076 if l > 0 { 2077 n += 1 + l + sovWebauthn(uint64(l)) 2078 } 2079 if m.XXX_unrecognized != nil { 2080 n += len(m.XXX_unrecognized) 2081 } 2082 return n 2083 } 2084 2085 func (m *CredentialCreation) Size() (n int) { 2086 if m == nil { 2087 return 0 2088 } 2089 var l int 2090 _ = l 2091 if m.PublicKey != nil { 2092 l = m.PublicKey.Size() 2093 n += 1 + l + sovWebauthn(uint64(l)) 2094 } 2095 if m.XXX_unrecognized != nil { 2096 n += len(m.XXX_unrecognized) 2097 } 2098 return n 2099 } 2100 2101 func (m *PublicKeyCredentialCreationOptions) Size() (n int) { 2102 if m == nil { 2103 return 0 2104 } 2105 var l int 2106 _ = l 2107 l = len(m.Challenge) 2108 if l > 0 { 2109 n += 1 + l + sovWebauthn(uint64(l)) 2110 } 2111 if m.Rp != nil { 2112 l = m.Rp.Size() 2113 n += 1 + l + sovWebauthn(uint64(l)) 2114 } 2115 if m.User != nil { 2116 l = m.User.Size() 2117 n += 1 + l + sovWebauthn(uint64(l)) 2118 } 2119 if len(m.CredentialParameters) > 0 { 2120 for _, e := range m.CredentialParameters { 2121 l = e.Size() 2122 n += 1 + l + sovWebauthn(uint64(l)) 2123 } 2124 } 2125 if m.TimeoutMs != 0 { 2126 n += 1 + sovWebauthn(uint64(m.TimeoutMs)) 2127 } 2128 if len(m.ExcludeCredentials) > 0 { 2129 for _, e := range m.ExcludeCredentials { 2130 l = e.Size() 2131 n += 1 + l + sovWebauthn(uint64(l)) 2132 } 2133 } 2134 l = len(m.Attestation) 2135 if l > 0 { 2136 n += 1 + l + sovWebauthn(uint64(l)) 2137 } 2138 if m.Extensions != nil { 2139 l = m.Extensions.Size() 2140 n += 1 + l + sovWebauthn(uint64(l)) 2141 } 2142 if m.AuthenticatorSelection != nil { 2143 l = m.AuthenticatorSelection.Size() 2144 n += 1 + l + sovWebauthn(uint64(l)) 2145 } 2146 if m.XXX_unrecognized != nil { 2147 n += len(m.XXX_unrecognized) 2148 } 2149 return n 2150 } 2151 2152 func (m *CredentialCreationResponse) Size() (n int) { 2153 if m == nil { 2154 return 0 2155 } 2156 var l int 2157 _ = l 2158 l = len(m.Type) 2159 if l > 0 { 2160 n += 1 + l + sovWebauthn(uint64(l)) 2161 } 2162 l = len(m.RawId) 2163 if l > 0 { 2164 n += 1 + l + sovWebauthn(uint64(l)) 2165 } 2166 if m.Response != nil { 2167 l = m.Response.Size() 2168 n += 1 + l + sovWebauthn(uint64(l)) 2169 } 2170 if m.Extensions != nil { 2171 l = m.Extensions.Size() 2172 n += 1 + l + sovWebauthn(uint64(l)) 2173 } 2174 if m.XXX_unrecognized != nil { 2175 n += len(m.XXX_unrecognized) 2176 } 2177 return n 2178 } 2179 2180 func (m *AuthenticatorAttestationResponse) Size() (n int) { 2181 if m == nil { 2182 return 0 2183 } 2184 var l int 2185 _ = l 2186 l = len(m.ClientDataJson) 2187 if l > 0 { 2188 n += 1 + l + sovWebauthn(uint64(l)) 2189 } 2190 l = len(m.AttestationObject) 2191 if l > 0 { 2192 n += 1 + l + sovWebauthn(uint64(l)) 2193 } 2194 if m.XXX_unrecognized != nil { 2195 n += len(m.XXX_unrecognized) 2196 } 2197 return n 2198 } 2199 2200 func (m *AuthenticationExtensionsClientInputs) Size() (n int) { 2201 if m == nil { 2202 return 0 2203 } 2204 var l int 2205 _ = l 2206 l = len(m.AppId) 2207 if l > 0 { 2208 n += 1 + l + sovWebauthn(uint64(l)) 2209 } 2210 if m.XXX_unrecognized != nil { 2211 n += len(m.XXX_unrecognized) 2212 } 2213 return n 2214 } 2215 2216 func (m *AuthenticationExtensionsClientOutputs) Size() (n int) { 2217 if m == nil { 2218 return 0 2219 } 2220 var l int 2221 _ = l 2222 if m.AppId { 2223 n += 2 2224 } 2225 if m.XXX_unrecognized != nil { 2226 n += len(m.XXX_unrecognized) 2227 } 2228 return n 2229 } 2230 2231 func (m *AuthenticatorSelection) Size() (n int) { 2232 if m == nil { 2233 return 0 2234 } 2235 var l int 2236 _ = l 2237 l = len(m.AuthenticatorAttachment) 2238 if l > 0 { 2239 n += 1 + l + sovWebauthn(uint64(l)) 2240 } 2241 if m.RequireResidentKey { 2242 n += 2 2243 } 2244 l = len(m.UserVerification) 2245 if l > 0 { 2246 n += 1 + l + sovWebauthn(uint64(l)) 2247 } 2248 if m.XXX_unrecognized != nil { 2249 n += len(m.XXX_unrecognized) 2250 } 2251 return n 2252 } 2253 2254 func (m *CredentialDescriptor) Size() (n int) { 2255 if m == nil { 2256 return 0 2257 } 2258 var l int 2259 _ = l 2260 l = len(m.Type) 2261 if l > 0 { 2262 n += 1 + l + sovWebauthn(uint64(l)) 2263 } 2264 l = len(m.Id) 2265 if l > 0 { 2266 n += 1 + l + sovWebauthn(uint64(l)) 2267 } 2268 if m.XXX_unrecognized != nil { 2269 n += len(m.XXX_unrecognized) 2270 } 2271 return n 2272 } 2273 2274 func (m *CredentialParameter) Size() (n int) { 2275 if m == nil { 2276 return 0 2277 } 2278 var l int 2279 _ = l 2280 l = len(m.Type) 2281 if l > 0 { 2282 n += 1 + l + sovWebauthn(uint64(l)) 2283 } 2284 if m.Alg != 0 { 2285 n += 1 + sovWebauthn(uint64(m.Alg)) 2286 } 2287 if m.XXX_unrecognized != nil { 2288 n += len(m.XXX_unrecognized) 2289 } 2290 return n 2291 } 2292 2293 func (m *RelyingPartyEntity) Size() (n int) { 2294 if m == nil { 2295 return 0 2296 } 2297 var l int 2298 _ = l 2299 l = len(m.Id) 2300 if l > 0 { 2301 n += 1 + l + sovWebauthn(uint64(l)) 2302 } 2303 l = len(m.Name) 2304 if l > 0 { 2305 n += 1 + l + sovWebauthn(uint64(l)) 2306 } 2307 if m.XXX_unrecognized != nil { 2308 n += len(m.XXX_unrecognized) 2309 } 2310 return n 2311 } 2312 2313 func (m *UserEntity) Size() (n int) { 2314 if m == nil { 2315 return 0 2316 } 2317 var l int 2318 _ = l 2319 l = len(m.Id) 2320 if l > 0 { 2321 n += 1 + l + sovWebauthn(uint64(l)) 2322 } 2323 l = len(m.Name) 2324 if l > 0 { 2325 n += 1 + l + sovWebauthn(uint64(l)) 2326 } 2327 l = len(m.DisplayName) 2328 if l > 0 { 2329 n += 1 + l + sovWebauthn(uint64(l)) 2330 } 2331 if m.XXX_unrecognized != nil { 2332 n += len(m.XXX_unrecognized) 2333 } 2334 return n 2335 } 2336 2337 func sovWebauthn(x uint64) (n int) { 2338 return (math_bits.Len64(x|1) + 6) / 7 2339 } 2340 func sozWebauthn(x uint64) (n int) { 2341 return sovWebauthn(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 2342 } 2343 func (m *CredentialAssertion) Unmarshal(dAtA []byte) error { 2344 l := len(dAtA) 2345 iNdEx := 0 2346 for iNdEx < l { 2347 preIndex := iNdEx 2348 var wire uint64 2349 for shift := uint(0); ; shift += 7 { 2350 if shift >= 64 { 2351 return ErrIntOverflowWebauthn 2352 } 2353 if iNdEx >= l { 2354 return io.ErrUnexpectedEOF 2355 } 2356 b := dAtA[iNdEx] 2357 iNdEx++ 2358 wire |= uint64(b&0x7F) << shift 2359 if b < 0x80 { 2360 break 2361 } 2362 } 2363 fieldNum := int32(wire >> 3) 2364 wireType := int(wire & 0x7) 2365 if wireType == 4 { 2366 return fmt.Errorf("proto: CredentialAssertion: wiretype end group for non-group") 2367 } 2368 if fieldNum <= 0 { 2369 return fmt.Errorf("proto: CredentialAssertion: illegal tag %d (wire type %d)", fieldNum, wire) 2370 } 2371 switch fieldNum { 2372 case 1: 2373 if wireType != 2 { 2374 return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) 2375 } 2376 var msglen int 2377 for shift := uint(0); ; shift += 7 { 2378 if shift >= 64 { 2379 return ErrIntOverflowWebauthn 2380 } 2381 if iNdEx >= l { 2382 return io.ErrUnexpectedEOF 2383 } 2384 b := dAtA[iNdEx] 2385 iNdEx++ 2386 msglen |= int(b&0x7F) << shift 2387 if b < 0x80 { 2388 break 2389 } 2390 } 2391 if msglen < 0 { 2392 return ErrInvalidLengthWebauthn 2393 } 2394 postIndex := iNdEx + msglen 2395 if postIndex < 0 { 2396 return ErrInvalidLengthWebauthn 2397 } 2398 if postIndex > l { 2399 return io.ErrUnexpectedEOF 2400 } 2401 if m.PublicKey == nil { 2402 m.PublicKey = &PublicKeyCredentialRequestOptions{} 2403 } 2404 if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2405 return err 2406 } 2407 iNdEx = postIndex 2408 default: 2409 iNdEx = preIndex 2410 skippy, err := skipWebauthn(dAtA[iNdEx:]) 2411 if err != nil { 2412 return err 2413 } 2414 if (skippy < 0) || (iNdEx+skippy) < 0 { 2415 return ErrInvalidLengthWebauthn 2416 } 2417 if (iNdEx + skippy) > l { 2418 return io.ErrUnexpectedEOF 2419 } 2420 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2421 iNdEx += skippy 2422 } 2423 } 2424 2425 if iNdEx > l { 2426 return io.ErrUnexpectedEOF 2427 } 2428 return nil 2429 } 2430 func (m *PublicKeyCredentialRequestOptions) Unmarshal(dAtA []byte) error { 2431 l := len(dAtA) 2432 iNdEx := 0 2433 for iNdEx < l { 2434 preIndex := iNdEx 2435 var wire uint64 2436 for shift := uint(0); ; shift += 7 { 2437 if shift >= 64 { 2438 return ErrIntOverflowWebauthn 2439 } 2440 if iNdEx >= l { 2441 return io.ErrUnexpectedEOF 2442 } 2443 b := dAtA[iNdEx] 2444 iNdEx++ 2445 wire |= uint64(b&0x7F) << shift 2446 if b < 0x80 { 2447 break 2448 } 2449 } 2450 fieldNum := int32(wire >> 3) 2451 wireType := int(wire & 0x7) 2452 if wireType == 4 { 2453 return fmt.Errorf("proto: PublicKeyCredentialRequestOptions: wiretype end group for non-group") 2454 } 2455 if fieldNum <= 0 { 2456 return fmt.Errorf("proto: PublicKeyCredentialRequestOptions: illegal tag %d (wire type %d)", fieldNum, wire) 2457 } 2458 switch fieldNum { 2459 case 1: 2460 if wireType != 2 { 2461 return fmt.Errorf("proto: wrong wireType = %d for field Challenge", wireType) 2462 } 2463 var byteLen int 2464 for shift := uint(0); ; shift += 7 { 2465 if shift >= 64 { 2466 return ErrIntOverflowWebauthn 2467 } 2468 if iNdEx >= l { 2469 return io.ErrUnexpectedEOF 2470 } 2471 b := dAtA[iNdEx] 2472 iNdEx++ 2473 byteLen |= int(b&0x7F) << shift 2474 if b < 0x80 { 2475 break 2476 } 2477 } 2478 if byteLen < 0 { 2479 return ErrInvalidLengthWebauthn 2480 } 2481 postIndex := iNdEx + byteLen 2482 if postIndex < 0 { 2483 return ErrInvalidLengthWebauthn 2484 } 2485 if postIndex > l { 2486 return io.ErrUnexpectedEOF 2487 } 2488 m.Challenge = append(m.Challenge[:0], dAtA[iNdEx:postIndex]...) 2489 if m.Challenge == nil { 2490 m.Challenge = []byte{} 2491 } 2492 iNdEx = postIndex 2493 case 2: 2494 if wireType != 0 { 2495 return fmt.Errorf("proto: wrong wireType = %d for field TimeoutMs", wireType) 2496 } 2497 m.TimeoutMs = 0 2498 for shift := uint(0); ; shift += 7 { 2499 if shift >= 64 { 2500 return ErrIntOverflowWebauthn 2501 } 2502 if iNdEx >= l { 2503 return io.ErrUnexpectedEOF 2504 } 2505 b := dAtA[iNdEx] 2506 iNdEx++ 2507 m.TimeoutMs |= int64(b&0x7F) << shift 2508 if b < 0x80 { 2509 break 2510 } 2511 } 2512 case 3: 2513 if wireType != 2 { 2514 return fmt.Errorf("proto: wrong wireType = %d for field RpId", wireType) 2515 } 2516 var stringLen uint64 2517 for shift := uint(0); ; shift += 7 { 2518 if shift >= 64 { 2519 return ErrIntOverflowWebauthn 2520 } 2521 if iNdEx >= l { 2522 return io.ErrUnexpectedEOF 2523 } 2524 b := dAtA[iNdEx] 2525 iNdEx++ 2526 stringLen |= uint64(b&0x7F) << shift 2527 if b < 0x80 { 2528 break 2529 } 2530 } 2531 intStringLen := int(stringLen) 2532 if intStringLen < 0 { 2533 return ErrInvalidLengthWebauthn 2534 } 2535 postIndex := iNdEx + intStringLen 2536 if postIndex < 0 { 2537 return ErrInvalidLengthWebauthn 2538 } 2539 if postIndex > l { 2540 return io.ErrUnexpectedEOF 2541 } 2542 m.RpId = string(dAtA[iNdEx:postIndex]) 2543 iNdEx = postIndex 2544 case 4: 2545 if wireType != 2 { 2546 return fmt.Errorf("proto: wrong wireType = %d for field AllowCredentials", wireType) 2547 } 2548 var msglen int 2549 for shift := uint(0); ; shift += 7 { 2550 if shift >= 64 { 2551 return ErrIntOverflowWebauthn 2552 } 2553 if iNdEx >= l { 2554 return io.ErrUnexpectedEOF 2555 } 2556 b := dAtA[iNdEx] 2557 iNdEx++ 2558 msglen |= int(b&0x7F) << shift 2559 if b < 0x80 { 2560 break 2561 } 2562 } 2563 if msglen < 0 { 2564 return ErrInvalidLengthWebauthn 2565 } 2566 postIndex := iNdEx + msglen 2567 if postIndex < 0 { 2568 return ErrInvalidLengthWebauthn 2569 } 2570 if postIndex > l { 2571 return io.ErrUnexpectedEOF 2572 } 2573 m.AllowCredentials = append(m.AllowCredentials, &CredentialDescriptor{}) 2574 if err := m.AllowCredentials[len(m.AllowCredentials)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2575 return err 2576 } 2577 iNdEx = postIndex 2578 case 5: 2579 if wireType != 2 { 2580 return fmt.Errorf("proto: wrong wireType = %d for field Extensions", wireType) 2581 } 2582 var msglen int 2583 for shift := uint(0); ; shift += 7 { 2584 if shift >= 64 { 2585 return ErrIntOverflowWebauthn 2586 } 2587 if iNdEx >= l { 2588 return io.ErrUnexpectedEOF 2589 } 2590 b := dAtA[iNdEx] 2591 iNdEx++ 2592 msglen |= int(b&0x7F) << shift 2593 if b < 0x80 { 2594 break 2595 } 2596 } 2597 if msglen < 0 { 2598 return ErrInvalidLengthWebauthn 2599 } 2600 postIndex := iNdEx + msglen 2601 if postIndex < 0 { 2602 return ErrInvalidLengthWebauthn 2603 } 2604 if postIndex > l { 2605 return io.ErrUnexpectedEOF 2606 } 2607 if m.Extensions == nil { 2608 m.Extensions = &AuthenticationExtensionsClientInputs{} 2609 } 2610 if err := m.Extensions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2611 return err 2612 } 2613 iNdEx = postIndex 2614 case 6: 2615 if wireType != 2 { 2616 return fmt.Errorf("proto: wrong wireType = %d for field UserVerification", wireType) 2617 } 2618 var stringLen uint64 2619 for shift := uint(0); ; shift += 7 { 2620 if shift >= 64 { 2621 return ErrIntOverflowWebauthn 2622 } 2623 if iNdEx >= l { 2624 return io.ErrUnexpectedEOF 2625 } 2626 b := dAtA[iNdEx] 2627 iNdEx++ 2628 stringLen |= uint64(b&0x7F) << shift 2629 if b < 0x80 { 2630 break 2631 } 2632 } 2633 intStringLen := int(stringLen) 2634 if intStringLen < 0 { 2635 return ErrInvalidLengthWebauthn 2636 } 2637 postIndex := iNdEx + intStringLen 2638 if postIndex < 0 { 2639 return ErrInvalidLengthWebauthn 2640 } 2641 if postIndex > l { 2642 return io.ErrUnexpectedEOF 2643 } 2644 m.UserVerification = string(dAtA[iNdEx:postIndex]) 2645 iNdEx = postIndex 2646 default: 2647 iNdEx = preIndex 2648 skippy, err := skipWebauthn(dAtA[iNdEx:]) 2649 if err != nil { 2650 return err 2651 } 2652 if (skippy < 0) || (iNdEx+skippy) < 0 { 2653 return ErrInvalidLengthWebauthn 2654 } 2655 if (iNdEx + skippy) > l { 2656 return io.ErrUnexpectedEOF 2657 } 2658 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2659 iNdEx += skippy 2660 } 2661 } 2662 2663 if iNdEx > l { 2664 return io.ErrUnexpectedEOF 2665 } 2666 return nil 2667 } 2668 func (m *CredentialAssertionResponse) Unmarshal(dAtA []byte) error { 2669 l := len(dAtA) 2670 iNdEx := 0 2671 for iNdEx < l { 2672 preIndex := iNdEx 2673 var wire uint64 2674 for shift := uint(0); ; shift += 7 { 2675 if shift >= 64 { 2676 return ErrIntOverflowWebauthn 2677 } 2678 if iNdEx >= l { 2679 return io.ErrUnexpectedEOF 2680 } 2681 b := dAtA[iNdEx] 2682 iNdEx++ 2683 wire |= uint64(b&0x7F) << shift 2684 if b < 0x80 { 2685 break 2686 } 2687 } 2688 fieldNum := int32(wire >> 3) 2689 wireType := int(wire & 0x7) 2690 if wireType == 4 { 2691 return fmt.Errorf("proto: CredentialAssertionResponse: wiretype end group for non-group") 2692 } 2693 if fieldNum <= 0 { 2694 return fmt.Errorf("proto: CredentialAssertionResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2695 } 2696 switch fieldNum { 2697 case 1: 2698 if wireType != 2 { 2699 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 2700 } 2701 var stringLen uint64 2702 for shift := uint(0); ; shift += 7 { 2703 if shift >= 64 { 2704 return ErrIntOverflowWebauthn 2705 } 2706 if iNdEx >= l { 2707 return io.ErrUnexpectedEOF 2708 } 2709 b := dAtA[iNdEx] 2710 iNdEx++ 2711 stringLen |= uint64(b&0x7F) << shift 2712 if b < 0x80 { 2713 break 2714 } 2715 } 2716 intStringLen := int(stringLen) 2717 if intStringLen < 0 { 2718 return ErrInvalidLengthWebauthn 2719 } 2720 postIndex := iNdEx + intStringLen 2721 if postIndex < 0 { 2722 return ErrInvalidLengthWebauthn 2723 } 2724 if postIndex > l { 2725 return io.ErrUnexpectedEOF 2726 } 2727 m.Type = string(dAtA[iNdEx:postIndex]) 2728 iNdEx = postIndex 2729 case 2: 2730 if wireType != 2 { 2731 return fmt.Errorf("proto: wrong wireType = %d for field RawId", wireType) 2732 } 2733 var byteLen int 2734 for shift := uint(0); ; shift += 7 { 2735 if shift >= 64 { 2736 return ErrIntOverflowWebauthn 2737 } 2738 if iNdEx >= l { 2739 return io.ErrUnexpectedEOF 2740 } 2741 b := dAtA[iNdEx] 2742 iNdEx++ 2743 byteLen |= int(b&0x7F) << shift 2744 if b < 0x80 { 2745 break 2746 } 2747 } 2748 if byteLen < 0 { 2749 return ErrInvalidLengthWebauthn 2750 } 2751 postIndex := iNdEx + byteLen 2752 if postIndex < 0 { 2753 return ErrInvalidLengthWebauthn 2754 } 2755 if postIndex > l { 2756 return io.ErrUnexpectedEOF 2757 } 2758 m.RawId = append(m.RawId[:0], dAtA[iNdEx:postIndex]...) 2759 if m.RawId == nil { 2760 m.RawId = []byte{} 2761 } 2762 iNdEx = postIndex 2763 case 3: 2764 if wireType != 2 { 2765 return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) 2766 } 2767 var msglen int 2768 for shift := uint(0); ; shift += 7 { 2769 if shift >= 64 { 2770 return ErrIntOverflowWebauthn 2771 } 2772 if iNdEx >= l { 2773 return io.ErrUnexpectedEOF 2774 } 2775 b := dAtA[iNdEx] 2776 iNdEx++ 2777 msglen |= int(b&0x7F) << shift 2778 if b < 0x80 { 2779 break 2780 } 2781 } 2782 if msglen < 0 { 2783 return ErrInvalidLengthWebauthn 2784 } 2785 postIndex := iNdEx + msglen 2786 if postIndex < 0 { 2787 return ErrInvalidLengthWebauthn 2788 } 2789 if postIndex > l { 2790 return io.ErrUnexpectedEOF 2791 } 2792 if m.Response == nil { 2793 m.Response = &AuthenticatorAssertionResponse{} 2794 } 2795 if err := m.Response.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2796 return err 2797 } 2798 iNdEx = postIndex 2799 case 4: 2800 if wireType != 2 { 2801 return fmt.Errorf("proto: wrong wireType = %d for field Extensions", wireType) 2802 } 2803 var msglen int 2804 for shift := uint(0); ; shift += 7 { 2805 if shift >= 64 { 2806 return ErrIntOverflowWebauthn 2807 } 2808 if iNdEx >= l { 2809 return io.ErrUnexpectedEOF 2810 } 2811 b := dAtA[iNdEx] 2812 iNdEx++ 2813 msglen |= int(b&0x7F) << shift 2814 if b < 0x80 { 2815 break 2816 } 2817 } 2818 if msglen < 0 { 2819 return ErrInvalidLengthWebauthn 2820 } 2821 postIndex := iNdEx + msglen 2822 if postIndex < 0 { 2823 return ErrInvalidLengthWebauthn 2824 } 2825 if postIndex > l { 2826 return io.ErrUnexpectedEOF 2827 } 2828 if m.Extensions == nil { 2829 m.Extensions = &AuthenticationExtensionsClientOutputs{} 2830 } 2831 if err := m.Extensions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2832 return err 2833 } 2834 iNdEx = postIndex 2835 default: 2836 iNdEx = preIndex 2837 skippy, err := skipWebauthn(dAtA[iNdEx:]) 2838 if err != nil { 2839 return err 2840 } 2841 if (skippy < 0) || (iNdEx+skippy) < 0 { 2842 return ErrInvalidLengthWebauthn 2843 } 2844 if (iNdEx + skippy) > l { 2845 return io.ErrUnexpectedEOF 2846 } 2847 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2848 iNdEx += skippy 2849 } 2850 } 2851 2852 if iNdEx > l { 2853 return io.ErrUnexpectedEOF 2854 } 2855 return nil 2856 } 2857 func (m *AuthenticatorAssertionResponse) Unmarshal(dAtA []byte) error { 2858 l := len(dAtA) 2859 iNdEx := 0 2860 for iNdEx < l { 2861 preIndex := iNdEx 2862 var wire uint64 2863 for shift := uint(0); ; shift += 7 { 2864 if shift >= 64 { 2865 return ErrIntOverflowWebauthn 2866 } 2867 if iNdEx >= l { 2868 return io.ErrUnexpectedEOF 2869 } 2870 b := dAtA[iNdEx] 2871 iNdEx++ 2872 wire |= uint64(b&0x7F) << shift 2873 if b < 0x80 { 2874 break 2875 } 2876 } 2877 fieldNum := int32(wire >> 3) 2878 wireType := int(wire & 0x7) 2879 if wireType == 4 { 2880 return fmt.Errorf("proto: AuthenticatorAssertionResponse: wiretype end group for non-group") 2881 } 2882 if fieldNum <= 0 { 2883 return fmt.Errorf("proto: AuthenticatorAssertionResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2884 } 2885 switch fieldNum { 2886 case 1: 2887 if wireType != 2 { 2888 return fmt.Errorf("proto: wrong wireType = %d for field ClientDataJson", wireType) 2889 } 2890 var byteLen int 2891 for shift := uint(0); ; shift += 7 { 2892 if shift >= 64 { 2893 return ErrIntOverflowWebauthn 2894 } 2895 if iNdEx >= l { 2896 return io.ErrUnexpectedEOF 2897 } 2898 b := dAtA[iNdEx] 2899 iNdEx++ 2900 byteLen |= int(b&0x7F) << shift 2901 if b < 0x80 { 2902 break 2903 } 2904 } 2905 if byteLen < 0 { 2906 return ErrInvalidLengthWebauthn 2907 } 2908 postIndex := iNdEx + byteLen 2909 if postIndex < 0 { 2910 return ErrInvalidLengthWebauthn 2911 } 2912 if postIndex > l { 2913 return io.ErrUnexpectedEOF 2914 } 2915 m.ClientDataJson = append(m.ClientDataJson[:0], dAtA[iNdEx:postIndex]...) 2916 if m.ClientDataJson == nil { 2917 m.ClientDataJson = []byte{} 2918 } 2919 iNdEx = postIndex 2920 case 2: 2921 if wireType != 2 { 2922 return fmt.Errorf("proto: wrong wireType = %d for field AuthenticatorData", wireType) 2923 } 2924 var byteLen int 2925 for shift := uint(0); ; shift += 7 { 2926 if shift >= 64 { 2927 return ErrIntOverflowWebauthn 2928 } 2929 if iNdEx >= l { 2930 return io.ErrUnexpectedEOF 2931 } 2932 b := dAtA[iNdEx] 2933 iNdEx++ 2934 byteLen |= int(b&0x7F) << shift 2935 if b < 0x80 { 2936 break 2937 } 2938 } 2939 if byteLen < 0 { 2940 return ErrInvalidLengthWebauthn 2941 } 2942 postIndex := iNdEx + byteLen 2943 if postIndex < 0 { 2944 return ErrInvalidLengthWebauthn 2945 } 2946 if postIndex > l { 2947 return io.ErrUnexpectedEOF 2948 } 2949 m.AuthenticatorData = append(m.AuthenticatorData[:0], dAtA[iNdEx:postIndex]...) 2950 if m.AuthenticatorData == nil { 2951 m.AuthenticatorData = []byte{} 2952 } 2953 iNdEx = postIndex 2954 case 3: 2955 if wireType != 2 { 2956 return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) 2957 } 2958 var byteLen int 2959 for shift := uint(0); ; shift += 7 { 2960 if shift >= 64 { 2961 return ErrIntOverflowWebauthn 2962 } 2963 if iNdEx >= l { 2964 return io.ErrUnexpectedEOF 2965 } 2966 b := dAtA[iNdEx] 2967 iNdEx++ 2968 byteLen |= int(b&0x7F) << shift 2969 if b < 0x80 { 2970 break 2971 } 2972 } 2973 if byteLen < 0 { 2974 return ErrInvalidLengthWebauthn 2975 } 2976 postIndex := iNdEx + byteLen 2977 if postIndex < 0 { 2978 return ErrInvalidLengthWebauthn 2979 } 2980 if postIndex > l { 2981 return io.ErrUnexpectedEOF 2982 } 2983 m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) 2984 if m.Signature == nil { 2985 m.Signature = []byte{} 2986 } 2987 iNdEx = postIndex 2988 case 4: 2989 if wireType != 2 { 2990 return fmt.Errorf("proto: wrong wireType = %d for field UserHandle", wireType) 2991 } 2992 var byteLen int 2993 for shift := uint(0); ; shift += 7 { 2994 if shift >= 64 { 2995 return ErrIntOverflowWebauthn 2996 } 2997 if iNdEx >= l { 2998 return io.ErrUnexpectedEOF 2999 } 3000 b := dAtA[iNdEx] 3001 iNdEx++ 3002 byteLen |= int(b&0x7F) << shift 3003 if b < 0x80 { 3004 break 3005 } 3006 } 3007 if byteLen < 0 { 3008 return ErrInvalidLengthWebauthn 3009 } 3010 postIndex := iNdEx + byteLen 3011 if postIndex < 0 { 3012 return ErrInvalidLengthWebauthn 3013 } 3014 if postIndex > l { 3015 return io.ErrUnexpectedEOF 3016 } 3017 m.UserHandle = append(m.UserHandle[:0], dAtA[iNdEx:postIndex]...) 3018 if m.UserHandle == nil { 3019 m.UserHandle = []byte{} 3020 } 3021 iNdEx = postIndex 3022 default: 3023 iNdEx = preIndex 3024 skippy, err := skipWebauthn(dAtA[iNdEx:]) 3025 if err != nil { 3026 return err 3027 } 3028 if (skippy < 0) || (iNdEx+skippy) < 0 { 3029 return ErrInvalidLengthWebauthn 3030 } 3031 if (iNdEx + skippy) > l { 3032 return io.ErrUnexpectedEOF 3033 } 3034 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3035 iNdEx += skippy 3036 } 3037 } 3038 3039 if iNdEx > l { 3040 return io.ErrUnexpectedEOF 3041 } 3042 return nil 3043 } 3044 func (m *CredentialCreation) Unmarshal(dAtA []byte) error { 3045 l := len(dAtA) 3046 iNdEx := 0 3047 for iNdEx < l { 3048 preIndex := iNdEx 3049 var wire uint64 3050 for shift := uint(0); ; shift += 7 { 3051 if shift >= 64 { 3052 return ErrIntOverflowWebauthn 3053 } 3054 if iNdEx >= l { 3055 return io.ErrUnexpectedEOF 3056 } 3057 b := dAtA[iNdEx] 3058 iNdEx++ 3059 wire |= uint64(b&0x7F) << shift 3060 if b < 0x80 { 3061 break 3062 } 3063 } 3064 fieldNum := int32(wire >> 3) 3065 wireType := int(wire & 0x7) 3066 if wireType == 4 { 3067 return fmt.Errorf("proto: CredentialCreation: wiretype end group for non-group") 3068 } 3069 if fieldNum <= 0 { 3070 return fmt.Errorf("proto: CredentialCreation: illegal tag %d (wire type %d)", fieldNum, wire) 3071 } 3072 switch fieldNum { 3073 case 1: 3074 if wireType != 2 { 3075 return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) 3076 } 3077 var msglen int 3078 for shift := uint(0); ; shift += 7 { 3079 if shift >= 64 { 3080 return ErrIntOverflowWebauthn 3081 } 3082 if iNdEx >= l { 3083 return io.ErrUnexpectedEOF 3084 } 3085 b := dAtA[iNdEx] 3086 iNdEx++ 3087 msglen |= int(b&0x7F) << shift 3088 if b < 0x80 { 3089 break 3090 } 3091 } 3092 if msglen < 0 { 3093 return ErrInvalidLengthWebauthn 3094 } 3095 postIndex := iNdEx + msglen 3096 if postIndex < 0 { 3097 return ErrInvalidLengthWebauthn 3098 } 3099 if postIndex > l { 3100 return io.ErrUnexpectedEOF 3101 } 3102 if m.PublicKey == nil { 3103 m.PublicKey = &PublicKeyCredentialCreationOptions{} 3104 } 3105 if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3106 return err 3107 } 3108 iNdEx = postIndex 3109 default: 3110 iNdEx = preIndex 3111 skippy, err := skipWebauthn(dAtA[iNdEx:]) 3112 if err != nil { 3113 return err 3114 } 3115 if (skippy < 0) || (iNdEx+skippy) < 0 { 3116 return ErrInvalidLengthWebauthn 3117 } 3118 if (iNdEx + skippy) > l { 3119 return io.ErrUnexpectedEOF 3120 } 3121 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3122 iNdEx += skippy 3123 } 3124 } 3125 3126 if iNdEx > l { 3127 return io.ErrUnexpectedEOF 3128 } 3129 return nil 3130 } 3131 func (m *PublicKeyCredentialCreationOptions) Unmarshal(dAtA []byte) error { 3132 l := len(dAtA) 3133 iNdEx := 0 3134 for iNdEx < l { 3135 preIndex := iNdEx 3136 var wire uint64 3137 for shift := uint(0); ; shift += 7 { 3138 if shift >= 64 { 3139 return ErrIntOverflowWebauthn 3140 } 3141 if iNdEx >= l { 3142 return io.ErrUnexpectedEOF 3143 } 3144 b := dAtA[iNdEx] 3145 iNdEx++ 3146 wire |= uint64(b&0x7F) << shift 3147 if b < 0x80 { 3148 break 3149 } 3150 } 3151 fieldNum := int32(wire >> 3) 3152 wireType := int(wire & 0x7) 3153 if wireType == 4 { 3154 return fmt.Errorf("proto: PublicKeyCredentialCreationOptions: wiretype end group for non-group") 3155 } 3156 if fieldNum <= 0 { 3157 return fmt.Errorf("proto: PublicKeyCredentialCreationOptions: illegal tag %d (wire type %d)", fieldNum, wire) 3158 } 3159 switch fieldNum { 3160 case 1: 3161 if wireType != 2 { 3162 return fmt.Errorf("proto: wrong wireType = %d for field Challenge", wireType) 3163 } 3164 var byteLen int 3165 for shift := uint(0); ; shift += 7 { 3166 if shift >= 64 { 3167 return ErrIntOverflowWebauthn 3168 } 3169 if iNdEx >= l { 3170 return io.ErrUnexpectedEOF 3171 } 3172 b := dAtA[iNdEx] 3173 iNdEx++ 3174 byteLen |= int(b&0x7F) << shift 3175 if b < 0x80 { 3176 break 3177 } 3178 } 3179 if byteLen < 0 { 3180 return ErrInvalidLengthWebauthn 3181 } 3182 postIndex := iNdEx + byteLen 3183 if postIndex < 0 { 3184 return ErrInvalidLengthWebauthn 3185 } 3186 if postIndex > l { 3187 return io.ErrUnexpectedEOF 3188 } 3189 m.Challenge = append(m.Challenge[:0], dAtA[iNdEx:postIndex]...) 3190 if m.Challenge == nil { 3191 m.Challenge = []byte{} 3192 } 3193 iNdEx = postIndex 3194 case 2: 3195 if wireType != 2 { 3196 return fmt.Errorf("proto: wrong wireType = %d for field Rp", wireType) 3197 } 3198 var msglen int 3199 for shift := uint(0); ; shift += 7 { 3200 if shift >= 64 { 3201 return ErrIntOverflowWebauthn 3202 } 3203 if iNdEx >= l { 3204 return io.ErrUnexpectedEOF 3205 } 3206 b := dAtA[iNdEx] 3207 iNdEx++ 3208 msglen |= int(b&0x7F) << shift 3209 if b < 0x80 { 3210 break 3211 } 3212 } 3213 if msglen < 0 { 3214 return ErrInvalidLengthWebauthn 3215 } 3216 postIndex := iNdEx + msglen 3217 if postIndex < 0 { 3218 return ErrInvalidLengthWebauthn 3219 } 3220 if postIndex > l { 3221 return io.ErrUnexpectedEOF 3222 } 3223 if m.Rp == nil { 3224 m.Rp = &RelyingPartyEntity{} 3225 } 3226 if err := m.Rp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3227 return err 3228 } 3229 iNdEx = postIndex 3230 case 3: 3231 if wireType != 2 { 3232 return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) 3233 } 3234 var msglen int 3235 for shift := uint(0); ; shift += 7 { 3236 if shift >= 64 { 3237 return ErrIntOverflowWebauthn 3238 } 3239 if iNdEx >= l { 3240 return io.ErrUnexpectedEOF 3241 } 3242 b := dAtA[iNdEx] 3243 iNdEx++ 3244 msglen |= int(b&0x7F) << shift 3245 if b < 0x80 { 3246 break 3247 } 3248 } 3249 if msglen < 0 { 3250 return ErrInvalidLengthWebauthn 3251 } 3252 postIndex := iNdEx + msglen 3253 if postIndex < 0 { 3254 return ErrInvalidLengthWebauthn 3255 } 3256 if postIndex > l { 3257 return io.ErrUnexpectedEOF 3258 } 3259 if m.User == nil { 3260 m.User = &UserEntity{} 3261 } 3262 if err := m.User.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3263 return err 3264 } 3265 iNdEx = postIndex 3266 case 4: 3267 if wireType != 2 { 3268 return fmt.Errorf("proto: wrong wireType = %d for field CredentialParameters", wireType) 3269 } 3270 var msglen int 3271 for shift := uint(0); ; shift += 7 { 3272 if shift >= 64 { 3273 return ErrIntOverflowWebauthn 3274 } 3275 if iNdEx >= l { 3276 return io.ErrUnexpectedEOF 3277 } 3278 b := dAtA[iNdEx] 3279 iNdEx++ 3280 msglen |= int(b&0x7F) << shift 3281 if b < 0x80 { 3282 break 3283 } 3284 } 3285 if msglen < 0 { 3286 return ErrInvalidLengthWebauthn 3287 } 3288 postIndex := iNdEx + msglen 3289 if postIndex < 0 { 3290 return ErrInvalidLengthWebauthn 3291 } 3292 if postIndex > l { 3293 return io.ErrUnexpectedEOF 3294 } 3295 m.CredentialParameters = append(m.CredentialParameters, &CredentialParameter{}) 3296 if err := m.CredentialParameters[len(m.CredentialParameters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3297 return err 3298 } 3299 iNdEx = postIndex 3300 case 5: 3301 if wireType != 0 { 3302 return fmt.Errorf("proto: wrong wireType = %d for field TimeoutMs", wireType) 3303 } 3304 m.TimeoutMs = 0 3305 for shift := uint(0); ; shift += 7 { 3306 if shift >= 64 { 3307 return ErrIntOverflowWebauthn 3308 } 3309 if iNdEx >= l { 3310 return io.ErrUnexpectedEOF 3311 } 3312 b := dAtA[iNdEx] 3313 iNdEx++ 3314 m.TimeoutMs |= int64(b&0x7F) << shift 3315 if b < 0x80 { 3316 break 3317 } 3318 } 3319 case 6: 3320 if wireType != 2 { 3321 return fmt.Errorf("proto: wrong wireType = %d for field ExcludeCredentials", wireType) 3322 } 3323 var msglen int 3324 for shift := uint(0); ; shift += 7 { 3325 if shift >= 64 { 3326 return ErrIntOverflowWebauthn 3327 } 3328 if iNdEx >= l { 3329 return io.ErrUnexpectedEOF 3330 } 3331 b := dAtA[iNdEx] 3332 iNdEx++ 3333 msglen |= int(b&0x7F) << shift 3334 if b < 0x80 { 3335 break 3336 } 3337 } 3338 if msglen < 0 { 3339 return ErrInvalidLengthWebauthn 3340 } 3341 postIndex := iNdEx + msglen 3342 if postIndex < 0 { 3343 return ErrInvalidLengthWebauthn 3344 } 3345 if postIndex > l { 3346 return io.ErrUnexpectedEOF 3347 } 3348 m.ExcludeCredentials = append(m.ExcludeCredentials, &CredentialDescriptor{}) 3349 if err := m.ExcludeCredentials[len(m.ExcludeCredentials)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3350 return err 3351 } 3352 iNdEx = postIndex 3353 case 7: 3354 if wireType != 2 { 3355 return fmt.Errorf("proto: wrong wireType = %d for field Attestation", wireType) 3356 } 3357 var stringLen uint64 3358 for shift := uint(0); ; shift += 7 { 3359 if shift >= 64 { 3360 return ErrIntOverflowWebauthn 3361 } 3362 if iNdEx >= l { 3363 return io.ErrUnexpectedEOF 3364 } 3365 b := dAtA[iNdEx] 3366 iNdEx++ 3367 stringLen |= uint64(b&0x7F) << shift 3368 if b < 0x80 { 3369 break 3370 } 3371 } 3372 intStringLen := int(stringLen) 3373 if intStringLen < 0 { 3374 return ErrInvalidLengthWebauthn 3375 } 3376 postIndex := iNdEx + intStringLen 3377 if postIndex < 0 { 3378 return ErrInvalidLengthWebauthn 3379 } 3380 if postIndex > l { 3381 return io.ErrUnexpectedEOF 3382 } 3383 m.Attestation = string(dAtA[iNdEx:postIndex]) 3384 iNdEx = postIndex 3385 case 8: 3386 if wireType != 2 { 3387 return fmt.Errorf("proto: wrong wireType = %d for field Extensions", wireType) 3388 } 3389 var msglen int 3390 for shift := uint(0); ; shift += 7 { 3391 if shift >= 64 { 3392 return ErrIntOverflowWebauthn 3393 } 3394 if iNdEx >= l { 3395 return io.ErrUnexpectedEOF 3396 } 3397 b := dAtA[iNdEx] 3398 iNdEx++ 3399 msglen |= int(b&0x7F) << shift 3400 if b < 0x80 { 3401 break 3402 } 3403 } 3404 if msglen < 0 { 3405 return ErrInvalidLengthWebauthn 3406 } 3407 postIndex := iNdEx + msglen 3408 if postIndex < 0 { 3409 return ErrInvalidLengthWebauthn 3410 } 3411 if postIndex > l { 3412 return io.ErrUnexpectedEOF 3413 } 3414 if m.Extensions == nil { 3415 m.Extensions = &AuthenticationExtensionsClientInputs{} 3416 } 3417 if err := m.Extensions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3418 return err 3419 } 3420 iNdEx = postIndex 3421 case 9: 3422 if wireType != 2 { 3423 return fmt.Errorf("proto: wrong wireType = %d for field AuthenticatorSelection", wireType) 3424 } 3425 var msglen int 3426 for shift := uint(0); ; shift += 7 { 3427 if shift >= 64 { 3428 return ErrIntOverflowWebauthn 3429 } 3430 if iNdEx >= l { 3431 return io.ErrUnexpectedEOF 3432 } 3433 b := dAtA[iNdEx] 3434 iNdEx++ 3435 msglen |= int(b&0x7F) << shift 3436 if b < 0x80 { 3437 break 3438 } 3439 } 3440 if msglen < 0 { 3441 return ErrInvalidLengthWebauthn 3442 } 3443 postIndex := iNdEx + msglen 3444 if postIndex < 0 { 3445 return ErrInvalidLengthWebauthn 3446 } 3447 if postIndex > l { 3448 return io.ErrUnexpectedEOF 3449 } 3450 if m.AuthenticatorSelection == nil { 3451 m.AuthenticatorSelection = &AuthenticatorSelection{} 3452 } 3453 if err := m.AuthenticatorSelection.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3454 return err 3455 } 3456 iNdEx = postIndex 3457 default: 3458 iNdEx = preIndex 3459 skippy, err := skipWebauthn(dAtA[iNdEx:]) 3460 if err != nil { 3461 return err 3462 } 3463 if (skippy < 0) || (iNdEx+skippy) < 0 { 3464 return ErrInvalidLengthWebauthn 3465 } 3466 if (iNdEx + skippy) > l { 3467 return io.ErrUnexpectedEOF 3468 } 3469 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3470 iNdEx += skippy 3471 } 3472 } 3473 3474 if iNdEx > l { 3475 return io.ErrUnexpectedEOF 3476 } 3477 return nil 3478 } 3479 func (m *CredentialCreationResponse) Unmarshal(dAtA []byte) error { 3480 l := len(dAtA) 3481 iNdEx := 0 3482 for iNdEx < l { 3483 preIndex := iNdEx 3484 var wire uint64 3485 for shift := uint(0); ; shift += 7 { 3486 if shift >= 64 { 3487 return ErrIntOverflowWebauthn 3488 } 3489 if iNdEx >= l { 3490 return io.ErrUnexpectedEOF 3491 } 3492 b := dAtA[iNdEx] 3493 iNdEx++ 3494 wire |= uint64(b&0x7F) << shift 3495 if b < 0x80 { 3496 break 3497 } 3498 } 3499 fieldNum := int32(wire >> 3) 3500 wireType := int(wire & 0x7) 3501 if wireType == 4 { 3502 return fmt.Errorf("proto: CredentialCreationResponse: wiretype end group for non-group") 3503 } 3504 if fieldNum <= 0 { 3505 return fmt.Errorf("proto: CredentialCreationResponse: illegal tag %d (wire type %d)", fieldNum, wire) 3506 } 3507 switch fieldNum { 3508 case 1: 3509 if wireType != 2 { 3510 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 3511 } 3512 var stringLen uint64 3513 for shift := uint(0); ; shift += 7 { 3514 if shift >= 64 { 3515 return ErrIntOverflowWebauthn 3516 } 3517 if iNdEx >= l { 3518 return io.ErrUnexpectedEOF 3519 } 3520 b := dAtA[iNdEx] 3521 iNdEx++ 3522 stringLen |= uint64(b&0x7F) << shift 3523 if b < 0x80 { 3524 break 3525 } 3526 } 3527 intStringLen := int(stringLen) 3528 if intStringLen < 0 { 3529 return ErrInvalidLengthWebauthn 3530 } 3531 postIndex := iNdEx + intStringLen 3532 if postIndex < 0 { 3533 return ErrInvalidLengthWebauthn 3534 } 3535 if postIndex > l { 3536 return io.ErrUnexpectedEOF 3537 } 3538 m.Type = string(dAtA[iNdEx:postIndex]) 3539 iNdEx = postIndex 3540 case 2: 3541 if wireType != 2 { 3542 return fmt.Errorf("proto: wrong wireType = %d for field RawId", wireType) 3543 } 3544 var byteLen int 3545 for shift := uint(0); ; shift += 7 { 3546 if shift >= 64 { 3547 return ErrIntOverflowWebauthn 3548 } 3549 if iNdEx >= l { 3550 return io.ErrUnexpectedEOF 3551 } 3552 b := dAtA[iNdEx] 3553 iNdEx++ 3554 byteLen |= int(b&0x7F) << shift 3555 if b < 0x80 { 3556 break 3557 } 3558 } 3559 if byteLen < 0 { 3560 return ErrInvalidLengthWebauthn 3561 } 3562 postIndex := iNdEx + byteLen 3563 if postIndex < 0 { 3564 return ErrInvalidLengthWebauthn 3565 } 3566 if postIndex > l { 3567 return io.ErrUnexpectedEOF 3568 } 3569 m.RawId = append(m.RawId[:0], dAtA[iNdEx:postIndex]...) 3570 if m.RawId == nil { 3571 m.RawId = []byte{} 3572 } 3573 iNdEx = postIndex 3574 case 3: 3575 if wireType != 2 { 3576 return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) 3577 } 3578 var msglen int 3579 for shift := uint(0); ; shift += 7 { 3580 if shift >= 64 { 3581 return ErrIntOverflowWebauthn 3582 } 3583 if iNdEx >= l { 3584 return io.ErrUnexpectedEOF 3585 } 3586 b := dAtA[iNdEx] 3587 iNdEx++ 3588 msglen |= int(b&0x7F) << shift 3589 if b < 0x80 { 3590 break 3591 } 3592 } 3593 if msglen < 0 { 3594 return ErrInvalidLengthWebauthn 3595 } 3596 postIndex := iNdEx + msglen 3597 if postIndex < 0 { 3598 return ErrInvalidLengthWebauthn 3599 } 3600 if postIndex > l { 3601 return io.ErrUnexpectedEOF 3602 } 3603 if m.Response == nil { 3604 m.Response = &AuthenticatorAttestationResponse{} 3605 } 3606 if err := m.Response.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3607 return err 3608 } 3609 iNdEx = postIndex 3610 case 4: 3611 if wireType != 2 { 3612 return fmt.Errorf("proto: wrong wireType = %d for field Extensions", wireType) 3613 } 3614 var msglen int 3615 for shift := uint(0); ; shift += 7 { 3616 if shift >= 64 { 3617 return ErrIntOverflowWebauthn 3618 } 3619 if iNdEx >= l { 3620 return io.ErrUnexpectedEOF 3621 } 3622 b := dAtA[iNdEx] 3623 iNdEx++ 3624 msglen |= int(b&0x7F) << shift 3625 if b < 0x80 { 3626 break 3627 } 3628 } 3629 if msglen < 0 { 3630 return ErrInvalidLengthWebauthn 3631 } 3632 postIndex := iNdEx + msglen 3633 if postIndex < 0 { 3634 return ErrInvalidLengthWebauthn 3635 } 3636 if postIndex > l { 3637 return io.ErrUnexpectedEOF 3638 } 3639 if m.Extensions == nil { 3640 m.Extensions = &AuthenticationExtensionsClientOutputs{} 3641 } 3642 if err := m.Extensions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3643 return err 3644 } 3645 iNdEx = postIndex 3646 default: 3647 iNdEx = preIndex 3648 skippy, err := skipWebauthn(dAtA[iNdEx:]) 3649 if err != nil { 3650 return err 3651 } 3652 if (skippy < 0) || (iNdEx+skippy) < 0 { 3653 return ErrInvalidLengthWebauthn 3654 } 3655 if (iNdEx + skippy) > l { 3656 return io.ErrUnexpectedEOF 3657 } 3658 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3659 iNdEx += skippy 3660 } 3661 } 3662 3663 if iNdEx > l { 3664 return io.ErrUnexpectedEOF 3665 } 3666 return nil 3667 } 3668 func (m *AuthenticatorAttestationResponse) Unmarshal(dAtA []byte) error { 3669 l := len(dAtA) 3670 iNdEx := 0 3671 for iNdEx < l { 3672 preIndex := iNdEx 3673 var wire uint64 3674 for shift := uint(0); ; shift += 7 { 3675 if shift >= 64 { 3676 return ErrIntOverflowWebauthn 3677 } 3678 if iNdEx >= l { 3679 return io.ErrUnexpectedEOF 3680 } 3681 b := dAtA[iNdEx] 3682 iNdEx++ 3683 wire |= uint64(b&0x7F) << shift 3684 if b < 0x80 { 3685 break 3686 } 3687 } 3688 fieldNum := int32(wire >> 3) 3689 wireType := int(wire & 0x7) 3690 if wireType == 4 { 3691 return fmt.Errorf("proto: AuthenticatorAttestationResponse: wiretype end group for non-group") 3692 } 3693 if fieldNum <= 0 { 3694 return fmt.Errorf("proto: AuthenticatorAttestationResponse: illegal tag %d (wire type %d)", fieldNum, wire) 3695 } 3696 switch fieldNum { 3697 case 1: 3698 if wireType != 2 { 3699 return fmt.Errorf("proto: wrong wireType = %d for field ClientDataJson", wireType) 3700 } 3701 var byteLen int 3702 for shift := uint(0); ; shift += 7 { 3703 if shift >= 64 { 3704 return ErrIntOverflowWebauthn 3705 } 3706 if iNdEx >= l { 3707 return io.ErrUnexpectedEOF 3708 } 3709 b := dAtA[iNdEx] 3710 iNdEx++ 3711 byteLen |= int(b&0x7F) << shift 3712 if b < 0x80 { 3713 break 3714 } 3715 } 3716 if byteLen < 0 { 3717 return ErrInvalidLengthWebauthn 3718 } 3719 postIndex := iNdEx + byteLen 3720 if postIndex < 0 { 3721 return ErrInvalidLengthWebauthn 3722 } 3723 if postIndex > l { 3724 return io.ErrUnexpectedEOF 3725 } 3726 m.ClientDataJson = append(m.ClientDataJson[:0], dAtA[iNdEx:postIndex]...) 3727 if m.ClientDataJson == nil { 3728 m.ClientDataJson = []byte{} 3729 } 3730 iNdEx = postIndex 3731 case 2: 3732 if wireType != 2 { 3733 return fmt.Errorf("proto: wrong wireType = %d for field AttestationObject", wireType) 3734 } 3735 var byteLen int 3736 for shift := uint(0); ; shift += 7 { 3737 if shift >= 64 { 3738 return ErrIntOverflowWebauthn 3739 } 3740 if iNdEx >= l { 3741 return io.ErrUnexpectedEOF 3742 } 3743 b := dAtA[iNdEx] 3744 iNdEx++ 3745 byteLen |= int(b&0x7F) << shift 3746 if b < 0x80 { 3747 break 3748 } 3749 } 3750 if byteLen < 0 { 3751 return ErrInvalidLengthWebauthn 3752 } 3753 postIndex := iNdEx + byteLen 3754 if postIndex < 0 { 3755 return ErrInvalidLengthWebauthn 3756 } 3757 if postIndex > l { 3758 return io.ErrUnexpectedEOF 3759 } 3760 m.AttestationObject = append(m.AttestationObject[:0], dAtA[iNdEx:postIndex]...) 3761 if m.AttestationObject == nil { 3762 m.AttestationObject = []byte{} 3763 } 3764 iNdEx = postIndex 3765 default: 3766 iNdEx = preIndex 3767 skippy, err := skipWebauthn(dAtA[iNdEx:]) 3768 if err != nil { 3769 return err 3770 } 3771 if (skippy < 0) || (iNdEx+skippy) < 0 { 3772 return ErrInvalidLengthWebauthn 3773 } 3774 if (iNdEx + skippy) > l { 3775 return io.ErrUnexpectedEOF 3776 } 3777 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3778 iNdEx += skippy 3779 } 3780 } 3781 3782 if iNdEx > l { 3783 return io.ErrUnexpectedEOF 3784 } 3785 return nil 3786 } 3787 func (m *AuthenticationExtensionsClientInputs) Unmarshal(dAtA []byte) error { 3788 l := len(dAtA) 3789 iNdEx := 0 3790 for iNdEx < l { 3791 preIndex := iNdEx 3792 var wire uint64 3793 for shift := uint(0); ; shift += 7 { 3794 if shift >= 64 { 3795 return ErrIntOverflowWebauthn 3796 } 3797 if iNdEx >= l { 3798 return io.ErrUnexpectedEOF 3799 } 3800 b := dAtA[iNdEx] 3801 iNdEx++ 3802 wire |= uint64(b&0x7F) << shift 3803 if b < 0x80 { 3804 break 3805 } 3806 } 3807 fieldNum := int32(wire >> 3) 3808 wireType := int(wire & 0x7) 3809 if wireType == 4 { 3810 return fmt.Errorf("proto: AuthenticationExtensionsClientInputs: wiretype end group for non-group") 3811 } 3812 if fieldNum <= 0 { 3813 return fmt.Errorf("proto: AuthenticationExtensionsClientInputs: illegal tag %d (wire type %d)", fieldNum, wire) 3814 } 3815 switch fieldNum { 3816 case 1: 3817 if wireType != 2 { 3818 return fmt.Errorf("proto: wrong wireType = %d for field AppId", wireType) 3819 } 3820 var stringLen uint64 3821 for shift := uint(0); ; shift += 7 { 3822 if shift >= 64 { 3823 return ErrIntOverflowWebauthn 3824 } 3825 if iNdEx >= l { 3826 return io.ErrUnexpectedEOF 3827 } 3828 b := dAtA[iNdEx] 3829 iNdEx++ 3830 stringLen |= uint64(b&0x7F) << shift 3831 if b < 0x80 { 3832 break 3833 } 3834 } 3835 intStringLen := int(stringLen) 3836 if intStringLen < 0 { 3837 return ErrInvalidLengthWebauthn 3838 } 3839 postIndex := iNdEx + intStringLen 3840 if postIndex < 0 { 3841 return ErrInvalidLengthWebauthn 3842 } 3843 if postIndex > l { 3844 return io.ErrUnexpectedEOF 3845 } 3846 m.AppId = string(dAtA[iNdEx:postIndex]) 3847 iNdEx = postIndex 3848 default: 3849 iNdEx = preIndex 3850 skippy, err := skipWebauthn(dAtA[iNdEx:]) 3851 if err != nil { 3852 return err 3853 } 3854 if (skippy < 0) || (iNdEx+skippy) < 0 { 3855 return ErrInvalidLengthWebauthn 3856 } 3857 if (iNdEx + skippy) > l { 3858 return io.ErrUnexpectedEOF 3859 } 3860 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3861 iNdEx += skippy 3862 } 3863 } 3864 3865 if iNdEx > l { 3866 return io.ErrUnexpectedEOF 3867 } 3868 return nil 3869 } 3870 func (m *AuthenticationExtensionsClientOutputs) Unmarshal(dAtA []byte) error { 3871 l := len(dAtA) 3872 iNdEx := 0 3873 for iNdEx < l { 3874 preIndex := iNdEx 3875 var wire uint64 3876 for shift := uint(0); ; shift += 7 { 3877 if shift >= 64 { 3878 return ErrIntOverflowWebauthn 3879 } 3880 if iNdEx >= l { 3881 return io.ErrUnexpectedEOF 3882 } 3883 b := dAtA[iNdEx] 3884 iNdEx++ 3885 wire |= uint64(b&0x7F) << shift 3886 if b < 0x80 { 3887 break 3888 } 3889 } 3890 fieldNum := int32(wire >> 3) 3891 wireType := int(wire & 0x7) 3892 if wireType == 4 { 3893 return fmt.Errorf("proto: AuthenticationExtensionsClientOutputs: wiretype end group for non-group") 3894 } 3895 if fieldNum <= 0 { 3896 return fmt.Errorf("proto: AuthenticationExtensionsClientOutputs: illegal tag %d (wire type %d)", fieldNum, wire) 3897 } 3898 switch fieldNum { 3899 case 1: 3900 if wireType != 0 { 3901 return fmt.Errorf("proto: wrong wireType = %d for field AppId", wireType) 3902 } 3903 var v int 3904 for shift := uint(0); ; shift += 7 { 3905 if shift >= 64 { 3906 return ErrIntOverflowWebauthn 3907 } 3908 if iNdEx >= l { 3909 return io.ErrUnexpectedEOF 3910 } 3911 b := dAtA[iNdEx] 3912 iNdEx++ 3913 v |= int(b&0x7F) << shift 3914 if b < 0x80 { 3915 break 3916 } 3917 } 3918 m.AppId = bool(v != 0) 3919 default: 3920 iNdEx = preIndex 3921 skippy, err := skipWebauthn(dAtA[iNdEx:]) 3922 if err != nil { 3923 return err 3924 } 3925 if (skippy < 0) || (iNdEx+skippy) < 0 { 3926 return ErrInvalidLengthWebauthn 3927 } 3928 if (iNdEx + skippy) > l { 3929 return io.ErrUnexpectedEOF 3930 } 3931 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3932 iNdEx += skippy 3933 } 3934 } 3935 3936 if iNdEx > l { 3937 return io.ErrUnexpectedEOF 3938 } 3939 return nil 3940 } 3941 func (m *AuthenticatorSelection) Unmarshal(dAtA []byte) error { 3942 l := len(dAtA) 3943 iNdEx := 0 3944 for iNdEx < l { 3945 preIndex := iNdEx 3946 var wire uint64 3947 for shift := uint(0); ; shift += 7 { 3948 if shift >= 64 { 3949 return ErrIntOverflowWebauthn 3950 } 3951 if iNdEx >= l { 3952 return io.ErrUnexpectedEOF 3953 } 3954 b := dAtA[iNdEx] 3955 iNdEx++ 3956 wire |= uint64(b&0x7F) << shift 3957 if b < 0x80 { 3958 break 3959 } 3960 } 3961 fieldNum := int32(wire >> 3) 3962 wireType := int(wire & 0x7) 3963 if wireType == 4 { 3964 return fmt.Errorf("proto: AuthenticatorSelection: wiretype end group for non-group") 3965 } 3966 if fieldNum <= 0 { 3967 return fmt.Errorf("proto: AuthenticatorSelection: illegal tag %d (wire type %d)", fieldNum, wire) 3968 } 3969 switch fieldNum { 3970 case 1: 3971 if wireType != 2 { 3972 return fmt.Errorf("proto: wrong wireType = %d for field AuthenticatorAttachment", wireType) 3973 } 3974 var stringLen uint64 3975 for shift := uint(0); ; shift += 7 { 3976 if shift >= 64 { 3977 return ErrIntOverflowWebauthn 3978 } 3979 if iNdEx >= l { 3980 return io.ErrUnexpectedEOF 3981 } 3982 b := dAtA[iNdEx] 3983 iNdEx++ 3984 stringLen |= uint64(b&0x7F) << shift 3985 if b < 0x80 { 3986 break 3987 } 3988 } 3989 intStringLen := int(stringLen) 3990 if intStringLen < 0 { 3991 return ErrInvalidLengthWebauthn 3992 } 3993 postIndex := iNdEx + intStringLen 3994 if postIndex < 0 { 3995 return ErrInvalidLengthWebauthn 3996 } 3997 if postIndex > l { 3998 return io.ErrUnexpectedEOF 3999 } 4000 m.AuthenticatorAttachment = string(dAtA[iNdEx:postIndex]) 4001 iNdEx = postIndex 4002 case 2: 4003 if wireType != 0 { 4004 return fmt.Errorf("proto: wrong wireType = %d for field RequireResidentKey", wireType) 4005 } 4006 var v int 4007 for shift := uint(0); ; shift += 7 { 4008 if shift >= 64 { 4009 return ErrIntOverflowWebauthn 4010 } 4011 if iNdEx >= l { 4012 return io.ErrUnexpectedEOF 4013 } 4014 b := dAtA[iNdEx] 4015 iNdEx++ 4016 v |= int(b&0x7F) << shift 4017 if b < 0x80 { 4018 break 4019 } 4020 } 4021 m.RequireResidentKey = bool(v != 0) 4022 case 3: 4023 if wireType != 2 { 4024 return fmt.Errorf("proto: wrong wireType = %d for field UserVerification", wireType) 4025 } 4026 var stringLen uint64 4027 for shift := uint(0); ; shift += 7 { 4028 if shift >= 64 { 4029 return ErrIntOverflowWebauthn 4030 } 4031 if iNdEx >= l { 4032 return io.ErrUnexpectedEOF 4033 } 4034 b := dAtA[iNdEx] 4035 iNdEx++ 4036 stringLen |= uint64(b&0x7F) << shift 4037 if b < 0x80 { 4038 break 4039 } 4040 } 4041 intStringLen := int(stringLen) 4042 if intStringLen < 0 { 4043 return ErrInvalidLengthWebauthn 4044 } 4045 postIndex := iNdEx + intStringLen 4046 if postIndex < 0 { 4047 return ErrInvalidLengthWebauthn 4048 } 4049 if postIndex > l { 4050 return io.ErrUnexpectedEOF 4051 } 4052 m.UserVerification = string(dAtA[iNdEx:postIndex]) 4053 iNdEx = postIndex 4054 default: 4055 iNdEx = preIndex 4056 skippy, err := skipWebauthn(dAtA[iNdEx:]) 4057 if err != nil { 4058 return err 4059 } 4060 if (skippy < 0) || (iNdEx+skippy) < 0 { 4061 return ErrInvalidLengthWebauthn 4062 } 4063 if (iNdEx + skippy) > l { 4064 return io.ErrUnexpectedEOF 4065 } 4066 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4067 iNdEx += skippy 4068 } 4069 } 4070 4071 if iNdEx > l { 4072 return io.ErrUnexpectedEOF 4073 } 4074 return nil 4075 } 4076 func (m *CredentialDescriptor) Unmarshal(dAtA []byte) error { 4077 l := len(dAtA) 4078 iNdEx := 0 4079 for iNdEx < l { 4080 preIndex := iNdEx 4081 var wire uint64 4082 for shift := uint(0); ; shift += 7 { 4083 if shift >= 64 { 4084 return ErrIntOverflowWebauthn 4085 } 4086 if iNdEx >= l { 4087 return io.ErrUnexpectedEOF 4088 } 4089 b := dAtA[iNdEx] 4090 iNdEx++ 4091 wire |= uint64(b&0x7F) << shift 4092 if b < 0x80 { 4093 break 4094 } 4095 } 4096 fieldNum := int32(wire >> 3) 4097 wireType := int(wire & 0x7) 4098 if wireType == 4 { 4099 return fmt.Errorf("proto: CredentialDescriptor: wiretype end group for non-group") 4100 } 4101 if fieldNum <= 0 { 4102 return fmt.Errorf("proto: CredentialDescriptor: illegal tag %d (wire type %d)", fieldNum, wire) 4103 } 4104 switch fieldNum { 4105 case 1: 4106 if wireType != 2 { 4107 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 4108 } 4109 var stringLen uint64 4110 for shift := uint(0); ; shift += 7 { 4111 if shift >= 64 { 4112 return ErrIntOverflowWebauthn 4113 } 4114 if iNdEx >= l { 4115 return io.ErrUnexpectedEOF 4116 } 4117 b := dAtA[iNdEx] 4118 iNdEx++ 4119 stringLen |= uint64(b&0x7F) << shift 4120 if b < 0x80 { 4121 break 4122 } 4123 } 4124 intStringLen := int(stringLen) 4125 if intStringLen < 0 { 4126 return ErrInvalidLengthWebauthn 4127 } 4128 postIndex := iNdEx + intStringLen 4129 if postIndex < 0 { 4130 return ErrInvalidLengthWebauthn 4131 } 4132 if postIndex > l { 4133 return io.ErrUnexpectedEOF 4134 } 4135 m.Type = string(dAtA[iNdEx:postIndex]) 4136 iNdEx = postIndex 4137 case 2: 4138 if wireType != 2 { 4139 return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) 4140 } 4141 var byteLen int 4142 for shift := uint(0); ; shift += 7 { 4143 if shift >= 64 { 4144 return ErrIntOverflowWebauthn 4145 } 4146 if iNdEx >= l { 4147 return io.ErrUnexpectedEOF 4148 } 4149 b := dAtA[iNdEx] 4150 iNdEx++ 4151 byteLen |= int(b&0x7F) << shift 4152 if b < 0x80 { 4153 break 4154 } 4155 } 4156 if byteLen < 0 { 4157 return ErrInvalidLengthWebauthn 4158 } 4159 postIndex := iNdEx + byteLen 4160 if postIndex < 0 { 4161 return ErrInvalidLengthWebauthn 4162 } 4163 if postIndex > l { 4164 return io.ErrUnexpectedEOF 4165 } 4166 m.Id = append(m.Id[:0], dAtA[iNdEx:postIndex]...) 4167 if m.Id == nil { 4168 m.Id = []byte{} 4169 } 4170 iNdEx = postIndex 4171 default: 4172 iNdEx = preIndex 4173 skippy, err := skipWebauthn(dAtA[iNdEx:]) 4174 if err != nil { 4175 return err 4176 } 4177 if (skippy < 0) || (iNdEx+skippy) < 0 { 4178 return ErrInvalidLengthWebauthn 4179 } 4180 if (iNdEx + skippy) > l { 4181 return io.ErrUnexpectedEOF 4182 } 4183 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4184 iNdEx += skippy 4185 } 4186 } 4187 4188 if iNdEx > l { 4189 return io.ErrUnexpectedEOF 4190 } 4191 return nil 4192 } 4193 func (m *CredentialParameter) Unmarshal(dAtA []byte) error { 4194 l := len(dAtA) 4195 iNdEx := 0 4196 for iNdEx < l { 4197 preIndex := iNdEx 4198 var wire uint64 4199 for shift := uint(0); ; shift += 7 { 4200 if shift >= 64 { 4201 return ErrIntOverflowWebauthn 4202 } 4203 if iNdEx >= l { 4204 return io.ErrUnexpectedEOF 4205 } 4206 b := dAtA[iNdEx] 4207 iNdEx++ 4208 wire |= uint64(b&0x7F) << shift 4209 if b < 0x80 { 4210 break 4211 } 4212 } 4213 fieldNum := int32(wire >> 3) 4214 wireType := int(wire & 0x7) 4215 if wireType == 4 { 4216 return fmt.Errorf("proto: CredentialParameter: wiretype end group for non-group") 4217 } 4218 if fieldNum <= 0 { 4219 return fmt.Errorf("proto: CredentialParameter: illegal tag %d (wire type %d)", fieldNum, wire) 4220 } 4221 switch fieldNum { 4222 case 1: 4223 if wireType != 2 { 4224 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 4225 } 4226 var stringLen uint64 4227 for shift := uint(0); ; shift += 7 { 4228 if shift >= 64 { 4229 return ErrIntOverflowWebauthn 4230 } 4231 if iNdEx >= l { 4232 return io.ErrUnexpectedEOF 4233 } 4234 b := dAtA[iNdEx] 4235 iNdEx++ 4236 stringLen |= uint64(b&0x7F) << shift 4237 if b < 0x80 { 4238 break 4239 } 4240 } 4241 intStringLen := int(stringLen) 4242 if intStringLen < 0 { 4243 return ErrInvalidLengthWebauthn 4244 } 4245 postIndex := iNdEx + intStringLen 4246 if postIndex < 0 { 4247 return ErrInvalidLengthWebauthn 4248 } 4249 if postIndex > l { 4250 return io.ErrUnexpectedEOF 4251 } 4252 m.Type = string(dAtA[iNdEx:postIndex]) 4253 iNdEx = postIndex 4254 case 2: 4255 if wireType != 0 { 4256 return fmt.Errorf("proto: wrong wireType = %d for field Alg", wireType) 4257 } 4258 m.Alg = 0 4259 for shift := uint(0); ; shift += 7 { 4260 if shift >= 64 { 4261 return ErrIntOverflowWebauthn 4262 } 4263 if iNdEx >= l { 4264 return io.ErrUnexpectedEOF 4265 } 4266 b := dAtA[iNdEx] 4267 iNdEx++ 4268 m.Alg |= int32(b&0x7F) << shift 4269 if b < 0x80 { 4270 break 4271 } 4272 } 4273 default: 4274 iNdEx = preIndex 4275 skippy, err := skipWebauthn(dAtA[iNdEx:]) 4276 if err != nil { 4277 return err 4278 } 4279 if (skippy < 0) || (iNdEx+skippy) < 0 { 4280 return ErrInvalidLengthWebauthn 4281 } 4282 if (iNdEx + skippy) > l { 4283 return io.ErrUnexpectedEOF 4284 } 4285 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4286 iNdEx += skippy 4287 } 4288 } 4289 4290 if iNdEx > l { 4291 return io.ErrUnexpectedEOF 4292 } 4293 return nil 4294 } 4295 func (m *RelyingPartyEntity) Unmarshal(dAtA []byte) error { 4296 l := len(dAtA) 4297 iNdEx := 0 4298 for iNdEx < l { 4299 preIndex := iNdEx 4300 var wire uint64 4301 for shift := uint(0); ; shift += 7 { 4302 if shift >= 64 { 4303 return ErrIntOverflowWebauthn 4304 } 4305 if iNdEx >= l { 4306 return io.ErrUnexpectedEOF 4307 } 4308 b := dAtA[iNdEx] 4309 iNdEx++ 4310 wire |= uint64(b&0x7F) << shift 4311 if b < 0x80 { 4312 break 4313 } 4314 } 4315 fieldNum := int32(wire >> 3) 4316 wireType := int(wire & 0x7) 4317 if wireType == 4 { 4318 return fmt.Errorf("proto: RelyingPartyEntity: wiretype end group for non-group") 4319 } 4320 if fieldNum <= 0 { 4321 return fmt.Errorf("proto: RelyingPartyEntity: illegal tag %d (wire type %d)", fieldNum, wire) 4322 } 4323 switch fieldNum { 4324 case 1: 4325 if wireType != 2 { 4326 return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) 4327 } 4328 var stringLen uint64 4329 for shift := uint(0); ; shift += 7 { 4330 if shift >= 64 { 4331 return ErrIntOverflowWebauthn 4332 } 4333 if iNdEx >= l { 4334 return io.ErrUnexpectedEOF 4335 } 4336 b := dAtA[iNdEx] 4337 iNdEx++ 4338 stringLen |= uint64(b&0x7F) << shift 4339 if b < 0x80 { 4340 break 4341 } 4342 } 4343 intStringLen := int(stringLen) 4344 if intStringLen < 0 { 4345 return ErrInvalidLengthWebauthn 4346 } 4347 postIndex := iNdEx + intStringLen 4348 if postIndex < 0 { 4349 return ErrInvalidLengthWebauthn 4350 } 4351 if postIndex > l { 4352 return io.ErrUnexpectedEOF 4353 } 4354 m.Id = string(dAtA[iNdEx:postIndex]) 4355 iNdEx = postIndex 4356 case 2: 4357 if wireType != 2 { 4358 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 4359 } 4360 var stringLen uint64 4361 for shift := uint(0); ; shift += 7 { 4362 if shift >= 64 { 4363 return ErrIntOverflowWebauthn 4364 } 4365 if iNdEx >= l { 4366 return io.ErrUnexpectedEOF 4367 } 4368 b := dAtA[iNdEx] 4369 iNdEx++ 4370 stringLen |= uint64(b&0x7F) << shift 4371 if b < 0x80 { 4372 break 4373 } 4374 } 4375 intStringLen := int(stringLen) 4376 if intStringLen < 0 { 4377 return ErrInvalidLengthWebauthn 4378 } 4379 postIndex := iNdEx + intStringLen 4380 if postIndex < 0 { 4381 return ErrInvalidLengthWebauthn 4382 } 4383 if postIndex > l { 4384 return io.ErrUnexpectedEOF 4385 } 4386 m.Name = string(dAtA[iNdEx:postIndex]) 4387 iNdEx = postIndex 4388 default: 4389 iNdEx = preIndex 4390 skippy, err := skipWebauthn(dAtA[iNdEx:]) 4391 if err != nil { 4392 return err 4393 } 4394 if (skippy < 0) || (iNdEx+skippy) < 0 { 4395 return ErrInvalidLengthWebauthn 4396 } 4397 if (iNdEx + skippy) > l { 4398 return io.ErrUnexpectedEOF 4399 } 4400 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4401 iNdEx += skippy 4402 } 4403 } 4404 4405 if iNdEx > l { 4406 return io.ErrUnexpectedEOF 4407 } 4408 return nil 4409 } 4410 func (m *UserEntity) Unmarshal(dAtA []byte) error { 4411 l := len(dAtA) 4412 iNdEx := 0 4413 for iNdEx < l { 4414 preIndex := iNdEx 4415 var wire uint64 4416 for shift := uint(0); ; shift += 7 { 4417 if shift >= 64 { 4418 return ErrIntOverflowWebauthn 4419 } 4420 if iNdEx >= l { 4421 return io.ErrUnexpectedEOF 4422 } 4423 b := dAtA[iNdEx] 4424 iNdEx++ 4425 wire |= uint64(b&0x7F) << shift 4426 if b < 0x80 { 4427 break 4428 } 4429 } 4430 fieldNum := int32(wire >> 3) 4431 wireType := int(wire & 0x7) 4432 if wireType == 4 { 4433 return fmt.Errorf("proto: UserEntity: wiretype end group for non-group") 4434 } 4435 if fieldNum <= 0 { 4436 return fmt.Errorf("proto: UserEntity: illegal tag %d (wire type %d)", fieldNum, wire) 4437 } 4438 switch fieldNum { 4439 case 1: 4440 if wireType != 2 { 4441 return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) 4442 } 4443 var byteLen int 4444 for shift := uint(0); ; shift += 7 { 4445 if shift >= 64 { 4446 return ErrIntOverflowWebauthn 4447 } 4448 if iNdEx >= l { 4449 return io.ErrUnexpectedEOF 4450 } 4451 b := dAtA[iNdEx] 4452 iNdEx++ 4453 byteLen |= int(b&0x7F) << shift 4454 if b < 0x80 { 4455 break 4456 } 4457 } 4458 if byteLen < 0 { 4459 return ErrInvalidLengthWebauthn 4460 } 4461 postIndex := iNdEx + byteLen 4462 if postIndex < 0 { 4463 return ErrInvalidLengthWebauthn 4464 } 4465 if postIndex > l { 4466 return io.ErrUnexpectedEOF 4467 } 4468 m.Id = append(m.Id[:0], dAtA[iNdEx:postIndex]...) 4469 if m.Id == nil { 4470 m.Id = []byte{} 4471 } 4472 iNdEx = postIndex 4473 case 2: 4474 if wireType != 2 { 4475 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 4476 } 4477 var stringLen uint64 4478 for shift := uint(0); ; shift += 7 { 4479 if shift >= 64 { 4480 return ErrIntOverflowWebauthn 4481 } 4482 if iNdEx >= l { 4483 return io.ErrUnexpectedEOF 4484 } 4485 b := dAtA[iNdEx] 4486 iNdEx++ 4487 stringLen |= uint64(b&0x7F) << shift 4488 if b < 0x80 { 4489 break 4490 } 4491 } 4492 intStringLen := int(stringLen) 4493 if intStringLen < 0 { 4494 return ErrInvalidLengthWebauthn 4495 } 4496 postIndex := iNdEx + intStringLen 4497 if postIndex < 0 { 4498 return ErrInvalidLengthWebauthn 4499 } 4500 if postIndex > l { 4501 return io.ErrUnexpectedEOF 4502 } 4503 m.Name = string(dAtA[iNdEx:postIndex]) 4504 iNdEx = postIndex 4505 case 3: 4506 if wireType != 2 { 4507 return fmt.Errorf("proto: wrong wireType = %d for field DisplayName", wireType) 4508 } 4509 var stringLen uint64 4510 for shift := uint(0); ; shift += 7 { 4511 if shift >= 64 { 4512 return ErrIntOverflowWebauthn 4513 } 4514 if iNdEx >= l { 4515 return io.ErrUnexpectedEOF 4516 } 4517 b := dAtA[iNdEx] 4518 iNdEx++ 4519 stringLen |= uint64(b&0x7F) << shift 4520 if b < 0x80 { 4521 break 4522 } 4523 } 4524 intStringLen := int(stringLen) 4525 if intStringLen < 0 { 4526 return ErrInvalidLengthWebauthn 4527 } 4528 postIndex := iNdEx + intStringLen 4529 if postIndex < 0 { 4530 return ErrInvalidLengthWebauthn 4531 } 4532 if postIndex > l { 4533 return io.ErrUnexpectedEOF 4534 } 4535 m.DisplayName = string(dAtA[iNdEx:postIndex]) 4536 iNdEx = postIndex 4537 default: 4538 iNdEx = preIndex 4539 skippy, err := skipWebauthn(dAtA[iNdEx:]) 4540 if err != nil { 4541 return err 4542 } 4543 if (skippy < 0) || (iNdEx+skippy) < 0 { 4544 return ErrInvalidLengthWebauthn 4545 } 4546 if (iNdEx + skippy) > l { 4547 return io.ErrUnexpectedEOF 4548 } 4549 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4550 iNdEx += skippy 4551 } 4552 } 4553 4554 if iNdEx > l { 4555 return io.ErrUnexpectedEOF 4556 } 4557 return nil 4558 } 4559 func skipWebauthn(dAtA []byte) (n int, err error) { 4560 l := len(dAtA) 4561 iNdEx := 0 4562 depth := 0 4563 for iNdEx < l { 4564 var wire uint64 4565 for shift := uint(0); ; shift += 7 { 4566 if shift >= 64 { 4567 return 0, ErrIntOverflowWebauthn 4568 } 4569 if iNdEx >= l { 4570 return 0, io.ErrUnexpectedEOF 4571 } 4572 b := dAtA[iNdEx] 4573 iNdEx++ 4574 wire |= (uint64(b) & 0x7F) << shift 4575 if b < 0x80 { 4576 break 4577 } 4578 } 4579 wireType := int(wire & 0x7) 4580 switch wireType { 4581 case 0: 4582 for shift := uint(0); ; shift += 7 { 4583 if shift >= 64 { 4584 return 0, ErrIntOverflowWebauthn 4585 } 4586 if iNdEx >= l { 4587 return 0, io.ErrUnexpectedEOF 4588 } 4589 iNdEx++ 4590 if dAtA[iNdEx-1] < 0x80 { 4591 break 4592 } 4593 } 4594 case 1: 4595 iNdEx += 8 4596 case 2: 4597 var length int 4598 for shift := uint(0); ; shift += 7 { 4599 if shift >= 64 { 4600 return 0, ErrIntOverflowWebauthn 4601 } 4602 if iNdEx >= l { 4603 return 0, io.ErrUnexpectedEOF 4604 } 4605 b := dAtA[iNdEx] 4606 iNdEx++ 4607 length |= (int(b) & 0x7F) << shift 4608 if b < 0x80 { 4609 break 4610 } 4611 } 4612 if length < 0 { 4613 return 0, ErrInvalidLengthWebauthn 4614 } 4615 iNdEx += length 4616 case 3: 4617 depth++ 4618 case 4: 4619 if depth == 0 { 4620 return 0, ErrUnexpectedEndOfGroupWebauthn 4621 } 4622 depth-- 4623 case 5: 4624 iNdEx += 4 4625 default: 4626 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 4627 } 4628 if iNdEx < 0 { 4629 return 0, ErrInvalidLengthWebauthn 4630 } 4631 if depth == 0 { 4632 return iNdEx, nil 4633 } 4634 } 4635 return 0, io.ErrUnexpectedEOF 4636 } 4637 4638 var ( 4639 ErrInvalidLengthWebauthn = fmt.Errorf("proto: negative length found during unmarshaling") 4640 ErrIntOverflowWebauthn = fmt.Errorf("proto: integer overflow") 4641 ErrUnexpectedEndOfGroupWebauthn = fmt.Errorf("proto: unexpected end of group") 4642 )