share

package
v0.0.0-...-48b6be6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assertion

type Assertion struct {
	// Version of this structure, to allow for modifications in the future.
	Version uint32

	// Authenticator data that was created for this assertion.
	AuthenticatorData *AuthenticatorData

	// Signature that was generated for this assertion.
	Signature []byte

	// Credential that was used for this assertion.
	Credential Credential

	// UserID
	UserID []byte

	//
	// Following fields have been added in WEBAUTHN_ASSERTION_VERSION_2
	//
	// TODO: warp this field
	Extensions RawExtensions

	CredLargeBlob []byte

	CredLargeBlobStatus uint32 // DWORD dwCredLargeBlobStatus

	HMACSecret *HMACSecretSalt //PWEBAUTHN_HMAC_SECRET_SALT pHmacSecret
}

Assertion ...

type AuthenticatorData

type AuthenticatorData struct {
	RPIDHash               [32]byte
	Flags                  Flags
	SignCounter            uint32
	AttestedCredentialData *CredentialData
	Extensions             any
}

func ParseAuthenticatorData

func ParseAuthenticatorData(data []byte) (*AuthenticatorData, error)

type CommonAttestation

type CommonAttestation struct {
	// Version of this structure, to allow for modifications in the future.
	Version uint32 // DWORD dwVersion;

	// Hash and Padding Algorithm
	//
	// The following won't be set for "fido-u2f" which assumes "ES256".
	AlgString string // PCWSTR pwszAlg;
	Alg       int32  // LONG lAlg;      // COSE algorithm

	// Signature that was generated for this attestation.
	Signature []byte // PBYTE pbSignature;

	// Following is set for Full Basic Attestation. If not, set then, this is Self Attestation.
	// Array of X.509 DER encoded certificates. The first certificate is the signer, leaf certificate.
	X5C []X5C // PWEBAUTHN_X5C pX5c;

	// Following are also set for tpm
	Ver      string //  PCWSTR pwszVer; // L"2.0"
	CertInfo []byte // PBYTE pbCertInfo;
	PubArea  []byte // PBYTE pbPubArea;
}

CommonAttestation contains the common data for an attestation.

type Credential

type Credential struct {
	// Version of this structure, to allow for modifications in the future.
	Version uint32 // DWORD dwVersion;

	// Unique ID for this particular credential.
	ID []byte

	// Well-known credential type specifying what this particular credential is.
	CredentialType string
}

Credential is the information about credential.

type CredentialAttestation

type CredentialAttestation struct {
	// Version of this structure, to allow for modifications in the future.
	Version uint32 // DWORD dwVersion;

	// Attestation format type
	FormatType string // PCWSTR pwszFormatType

	// Authenticator data that was created for this credential.
	AuthenticatorData *AuthenticatorData // PBYTE              pbAuthenticatorData

	//Encoded CBOR attestation information
	Attestation []byte // PBYTE              pbAttestation

	// Following depends on the dwAttestationDecodeType
	//  WEBAUTHN_ATTESTATION_DECODE_NONE
	//      NULL - not able to decode the CBOR attestation information
	//  WEBAUTHN_ATTESTATION_DECODE_COMMON
	//      PWEBAUTHN_COMMON_ATTESTATION;
	AttestationDecode *CommonAttestation // PVOID pvAttestationDecode

	// The CBOR encoded Attestation Object to be returned to the RP.
	AttestationObject []byte // PBYTE              pbAttestationObject

	// The CredentialId bytes extracted from the Authenticator Data.
	// Used by Edge to return to the RP.
	CredentialID []byte // PBYTE              pbCredentialId

	Extensions Extensions // WEBAUTHN_EXTENSIONS Extensions

	// One of the WEBAUTHN_CTAP_TRANSPORT_* bits will be set corresponding to
	// the transport that was used.
	UsedTransport uint32 // DWORD dwUsedTransport

	EpAtt              bool // BOOL bEpAtt
	LargeBlobSupported bool // BOOL  bLargeBlobSupported
	ResidentKey        bool // BOOL  bResidentKey
}

CredentialAttestation info.

type CredentialData

type CredentialData struct {
	AAGUID              uuid.UUID
	CredentialID        []byte
	CredentialPublicKey cose.COSEPublicKey
}

type CredentialDetails

type CredentialDetails struct {
	// Version of this structure, to allow for modifications in the future.
	Version uint32

	CredentialID []byte

	// RP Info
	RPInformation *RPInfo

	// User Info
	UserInformation *UserInfo

	// Removable or not.
	Removable bool // BOOL bRemovable
}

CredentialDetails ...

type Extension

type Extension struct {
	Identifier string
	ID         uint32
	// TODO
	Ptr unsafe.Pointer
}

Extension contains information about an extension.

type Extensions

type Extensions []*Extension

Extensions contains a list of extensions

type Flags

type Flags struct {
	UserPresent            bool
	RFU1                   bool
	UserVerified           bool
	BackupEligibility      bool
	BackupState            bool
	RFU2                   bool
	AttestedCredentialData bool
	ExtensionData          bool
}

type HMACSecretSalt

type HMACSecretSalt struct {
	First  []byte
	Second []byte
}

HMACSecretSalt ...

type RPInfo

type RPInfo struct {
	// Version of this structure, to allow for modifications in the future.
	// This field is required and should be set to CURRENT_VERSION above.
	Version uint32 //DWORD dwVersion;

	// Identifier for the RP. This field is required.
	ID string

	// Contains the friendly name of the Relying Party, such as "Acme Corporation", "Widgets Inc" or "Awesome Site".
	// This field is required.
	Name string

	// Optional URL pointing to RP's logo.
	Icon string
}

RPInfo is the information about an RP Entity

type RawAssertion

type RawAssertion struct {
	// Version of this structure, to allow for modifications in the future.
	Version uint32 // DWORD dwVersion;

	// Size of cbAuthenticatorData.
	AuthenticatorDataLen uint32 // DWORD cbAuthenticatorData;
	// Authenticator data that was created for this assertion.
	// _Field_size_bytes_(cbAuthenticatorData)
	AuthenticatorDataPtr *byte // PBYTE pbAuthenticatorData;

	// Size of pbSignature.
	SignatureLen uint32 // DWORD cbSignature;
	// Signature that was generated for this assertion.
	// _Field_size_bytes_(cbSignature)
	SignaturePtr *byte // PBYTE pbSignature;

	// Credential that was used for this assertion.
	Credential RawCredential // WEBAUTHN_CREDENTIAL Credential;

	// Size of User Id
	UserIDLen uint32 // DWORD cbUserId;
	// UserId
	// _Field_size_bytes_(cbUserId)
	UserIDPtr *byte // PBYTE pbUserId;

	Extensions RawExtensions // WEBAUTHN_EXTENSIONS Extensions

	// Size of pbCredLargeBlob
	CredLargeBlobLen uint32 // DWORD              cbCredLargeBlob
	// _Field_size_bytes_ (cbCredLargeBlob)
	CredLargeBlobPtr *byte // PBYTE              pbCredLargeBlob

	CredLargeBlobStatus uint32 // DWORD dwCredLargeBlobStatus

	HMACSecret *RawHMACSecretSalt //PWEBAUTHN_HMAC_SECRET_SALT pHmacSecret
}

RawAssertion is authenticatorGetAssertion output.

func (*RawAssertion) DeRaw

func (c *RawAssertion) DeRaw() *Assertion

DeRaw ...

type RawAuthenticatorGetAssertionOptions

type RawAuthenticatorGetAssertionOptions struct {
	// Version of this structure, to allow for modifications in the future.
	Version uint32 // DWORD

	// Time that the operation is expected to complete within.
	// This is used as guidance, and can be overridden by the platform.
	TimeoutMilliseconds uint32 // DWORD

	// Allowed Credentials List.
	CredentialList RawCredentials // WEBAUTHN_CREDENTIALS CredentialList

	// Optional extensions to parse when performing the operation.
	Extensions RawExtensions // WEBAUTHN_EXTENSIONS Extensions

	// Optional. Platform vs Cross-Platform Authenticators.
	AuthenticatorAttachment uint32 // DWORD dwAuthenticatorAttachment

	// User Verification Requirement.
	UserVerificationRequirement uint32 // DWORD dwUserVerificationRequirement

	// Flags
	Flags uint32 // DWORD dwFlags

	// Optional identifier for the U2F AppId. Converted to UTF8 before being hashed. Not lower cased.
	U2fAppID *uint16 // PCWSTR pwszU2fAppId

	// If the following is non-NULL, then, set to TRUE if the above pwszU2fAppid was used instead of
	// PCWSTR pwszRpId;
	IsU2fAppIDUsed *bool // BOOL *pbU2fAppId

	// Cancellation Id - Optional - See WebAuthNGetCancellationId
	CancellationID *windows.GUID // GUID *pCancellationId

	// Allow Credential List. If present, "CredentialList" will be ignored.
	AllowCredentialList *RawCredentialList // PWEBAUTHN_CREDENTIAL_LIST pAllowCredentialList

	CredLargeBlobOperation uint32 // DWORD dwCredLargeBlobOperation

	// Size of pbCredLargeBlob
	CredLargeBlobLen uint32 // DWORD              cbCredLargeBlob
	// _Field_size_bytes_ (cbCredLargeBlob)
	CredLargeBlobPtr byte // PBYTE              pbCredLargeBlob

	// PRF values which will be converted into HMAC-SECRET values according to WebAuthn Spec.
	HMACSecretSaltValues *RawHMACSecretSaltValues //  PWEBAUTHN_HMAC_SECRET_SALT_VALUES pHmacSecretSaltValues

	// Optional. BrowserInPrivate Mode. Defaulting to FALSE.
	BrowserInPrivateMode bool // BOOL bBrowserInPrivateMode
}

RawAuthenticatorGetAssertionOptions ...

type RawAuthenticatorMakeCredentialOptions

type RawAuthenticatorMakeCredentialOptions struct {
	// Version of this structure, to allow for modifications in the future.
	Version uint32 // DWORD dwVersion;

	// Time that the operation is expected to complete within.
	// This is used as guidance, and can be overridden by the platform.
	TimeoutMilliseconds uint32 // DWORD dwTimeoutMilliseconds

	// Credentials used for exclusion.
	CredentialList RawCredentials // WEBAUTHN_CREDENTIALS CredentialList

	// Optional extensions to parse when performing the operation.
	Extensions RawExtensions // WEBAUTHN_EXTENSIONS Extensions

	// Optional. Platform vs Cross-Platform Authenticators.
	AuthenticatorAttachment uint32 // DWORD dwAuthenticatorAttachment

	// Optional. Require key to be resident or not. Defaulting to FALSE.
	RequireResidentKey bool // BOOL bRequireResidentKey

	// User Verification Requirement.
	UserVerificationRequirement uint32 // DWORD dwUserVerificationRequirement

	// Attestation Conveyance Preference.
	AttestationConveyancePreference uint32 // DWORD dwAttestationConveyancePreference

	// Reserved for future Use
	Flags uint32 // DWORD dwFlags

	// Cancellation Id - Optional - See WebAuthNGetCancellationId
	CancellationID *windows.GUID // GUID *pCancellationId

	// Exclude Credential List. If present, "CredentialList" will be ignored.
	ExcludeCredentialList *RawCredentialList // PWEBAUTHN_CREDENTIAL_LIST pExcludeCredentialList

	// Enterprise Attestation
	EnterpriseAttestation uint32 // DWORD dwEnterpriseAttestation

	// Large Blob Support: none, required or preferred
	//
	// NTE_INVALID_PARAMETER when large blob required or preferred and
	//   bRequireResidentKey isn't set to TRUE
	LargeBlobSupport uint32 // DWORD dwLargeBlobSupport

	// Optional. Prefer key to be resident. Defaulting to FALSE. When TRUE,
	// overrides the above bRequireResidentKey.
	PreferResidentKey bool // BOOL bPreferResidentKey

	// Optional. BrowserInPrivate Mode. Defaulting to FALSE.
	BrowserInPrivateMode bool // BOOL bBrowserInPrivateMode
}

RawAuthenticatorMakeCredentialOptions ...

type RawCOSECredentialParameter

type RawCOSECredentialParameter struct {
	// Version of this structure, to allow for modifications in the future.
	Version uint32 // DWORD dwVersion;

	// Well-known credential type specifying a credential to create.
	CredentialType *uint16 // LPCWSTR pwszCredentialType

	// Well-known COSE algorithm specifying the algorithm to use for the credential.
	Alg int32 // LONG lAlg
}

RawCOSECredentialParameter is the information about credential parameter.

type RawCOSECredentialParameters

type RawCOSECredentialParameters struct {
	CredentialParametersLen uint32 // DWORD cCredentialParameters;
	// _Field_size_(cCredentialParameters)
	CredentialParameters *RawCOSECredentialParameter // PWEBAUTHN_COSE_CREDENTIAL_PARAMETER pCredentialParameters;
}

RawCOSECredentialParameters is the information about credential parameters.

type RawCollectedClient

type RawCollectedClient struct {
	Type      string `json:"type"`
	Challenge string `json:"challenge"`
	Origin    string `json:"origin"`
}

RawCollectedClient is the information about client data json.

type RawCollectedClientData

type RawCollectedClientData struct {
	// Version of this structure, to allow for modifications in the future.
	// This field is required and should be set to CURRENT_VERSION above.
	Version uint32 // DWORD dwVersion

	// Size of the pbClientDataJSON field.
	ClientDataJSONLen uint32 // DWORD cbClientDataJSON
	// UTF-8 encoded JSON serialization of the client data.
	// _Field_size_bytes_ (cbClientDataJSON)
	ClientDataJSONPtr *byte // PBYTE              pbClientDataJSON

	// Hash algorithm ID used to hash the pbClientDataJSON field.
	HashAlgID *uint16 // LPCWSTR pwszHashAlgId
}

RawCollectedClientData is the information about client data.

type RawCommonAttestation

type RawCommonAttestation struct {
	// Version of this structure, to allow for modifications in the future.
	Version uint32 // DWORD dwVersion;

	// Hash and Padding Algorithm
	//
	// The following won't be set for "fido-u2f" which assumes "ES256".
	AlgString *uint16 // PCWSTR pwszAlg;
	Alg       int32   // LONG lAlg;      // COSE algorithm

	// Signature that was generated for this attestation.
	SignatureLen uint32 // DWORD cbSignature;
	// _Field_size_bytes_(cbSignature)
	SignaturePtr *byte // PBYTE pbSignature;

	// Following is set for Full Basic Attestation. If not, set then, this is Self Attestation.
	// Array of X.509 DER encoded certificates. The first certificate is the signer, leaf certificate.
	X5CLen uint32 // DWORD cX5c;
	// _Field_size_(cX5c)
	X5CPtr *RawX5C // PWEBAUTHN_X5C pX5c;

	// Following are also set for tpm
	Ver         *uint16 //  PCWSTR pwszVer; // L"2.0"
	CertInfoLen uint32  // DWORD cbCertInfo;
	// _Field_size_bytes_(cbCertInfo)
	CertInfoPtr *byte  // PBYTE pbCertInfo;
	PubAreaLen  uint32 // DWORD cbPubArea;
	// _Field_size_bytes_(cbPubArea)
	PubAreaPtr *byte // PBYTE pbPubArea;
}

RawCommonAttestation contains the common data for an attestation.

func (*RawCommonAttestation) DeRaw

type RawCredWithHMACSecretSalt

type RawCredWithHMACSecretSalt struct {
	// Size of pbCredID.
	CredIDLen uint32 // DWORD              cbCredID
	// _Field_size_bytes_ (cbCredID)
	CredIDPtr *byte // PBYTE              pbCredID // Required

	// PRF Values for above credential
	HMACSecretSalt *RawHMACSecretSalt // PWEBAUTHN_HMAC_SECRET_SALT pHmacSecretSalt // Required
}

RawCredWithHMACSecretSalt ...

_WEBAUTHN_CRED_WITH_HMAC_SECRET_SALT

type RawCredential

type RawCredential struct {
	// Version of this structure, to allow for modifications in the future.
	Version uint32 // DWORD dwVersion;

	// Size of pbID.
	IDLen uint32 // DWORD cbId;
	// Unique ID for this particular credential.
	// _Field_size_bytes_(cbId)
	IDPtr *byte // PBYTE pbId;

	// Well-known credential type specifying what this particular credential is.
	CredentialType *uint16 // LPCWSTR pwszCredentialType;
}

RawCredential is the information about credential.

_WEBAUTHN_CREDENTIAL

func (*RawCredential) DeRaw

func (c *RawCredential) DeRaw() *Credential

DeRaw ...

type RawCredentialAttestation

type RawCredentialAttestation struct {
	// Version of this structure, to allow for modifications in the future.
	Version uint32 // DWORD dwVersion;

	// Attestation format type
	FormatType *uint16 // PCWSTR pwszFormatType

	// Size of cbAuthenticatorData.
	AuthenticatorDataLen uint32 // DWORD cbAuthenticatorData
	// Authenticator data that was created for this credential.
	// _Field_size_bytes_ (cbAuthenticatorData)
	AuthenticatorDataPtr *byte // PBYTE              pbAuthenticatorData

	// Size of CBOR encoded attestation information
	//0 => encoded as CBOR null value.
	AttestationLen uint32 // DWORD cbAttestation
	//Encoded CBOR attestation information
	// _Field_size_bytes_ (cbAttestation)
	AttestationPtr *byte // PBYTE              pbAttestation

	AttestationDecodeType uint32 // DWORD dwAttestationDecodeType
	// Following depends on the dwAttestationDecodeType
	//  WEBAUTHN_ATTESTATION_DECODE_NONE
	//      NULL - not able to decode the CBOR attestation information
	//  WEBAUTHN_ATTESTATION_DECODE_COMMON
	//      PWEBAUTHN_COMMON_ATTESTATION;
	AttestationDecode unsafe.Pointer // PVOID pvAttestationDecode

	// The CBOR encoded Attestation Object to be returned to the RP.
	AttestationObjectLen uint32 // DWORD              cbAttestationObject
	// _Field_size_bytes_ (cbAttestationObject)
	AttestationObjectPtr *byte // PBYTE              pbAttestationObject

	// The CredentialId bytes extracted from the Authenticator Data.
	// Used by Edge to return to the RP.
	CredentialIDLen uint32 // DWORD              cbCredentialId
	// _Field_size_bytes_ (cbCredentialId)
	CredentialIDPtr *byte // PBYTE              pbCredentialId

	Extensions *RawExtensions // WEBAUTHN_EXTENSIONS Extensions

	// One of the WEBAUTHN_CTAP_TRANSPORT_* bits will be set corresponding to
	// the transport that was used.
	UsedTransport uint32 // DWORD dwUsedTransport

	EpAtt              bool // BOOL bEpAtt
	LargeBlobSupported bool // BOOL  bLargeBlobSupported
	ResidentKey        bool // BOOL  bResidentKey
}

RawCredentialAttestation info.

func (*RawCredentialAttestation) DeRaw

type RawCredentialDetails

type RawCredentialDetails struct {
	// Version of this structure, to allow for modifications in the future.
	Version uint32 // DWORD dwVersion

	// Size of pbCredentialID.
	CredentialIDLen uint32 // DWORD              cbCredentialID
	// _Field_size_bytes_ (cbCredentialID)
	CredentialIDPtr *byte // PBYTE              pbCredentialID

	// RP Info
	RPInformation *RawRPInfo // PWEBAUTHN_RP_ENTITY_INFORMATION pRpInformation

	// User Info
	UserInformation *RawUserInfo // PWEBAUTHN_USER_ENTITY_INFORMATION pUserInformation

	// Removable or not.
	Removable bool // BOOL bRemovable
}

RawCredentialDetails is the Credential Information for WebAuthNGetPlatformCredentialList API

_WEBAUTHN_CREDENTIAL_DETAILS

func (*RawCredentialDetails) DeRaw

DeRaw ...

type RawCredentialDetailsList

type RawCredentialDetailsList struct {
	CredentialDetailsLen uint32 // DWORD                        cCredentialDetails
	// _Field_size_                 (cCredentialDetails)
	CredentialDetailsPtr **RawCredentialDetails // PWEBAUTHN_CREDENTIAL_DETAILS *ppCredentialDetails
}

RawCredentialDetailsList ...

_WEBAUTHN_CREDENTIAL_DETAILS_LIST

func (*RawCredentialDetailsList) DeRaw

DeRaw ...

type RawCredentialEX

type RawCredentialEX struct {
	// Version of this structure, to allow for modifications in the future.
	Version uint32 // DWORD dwVersion;

	// Size of pbID.
	IDLen uint32 // DWORD cbId;
	// Unique ID for this particular credential.
	// _Field_size_bytes_(cbId)
	InPtr *byte // PBYTE pbId;

	// Well-known credential type specifying what this particular credential is.
	CredentialType *uint16 // LPCWSTR pwszCredentialType;

	// Transports. 0 implies no transport restrictions.
	Transports uint32 // DWORD dwTransports;
}

RawCredentialEX is the information about credential with extra information, such as, dwTransports

_WEBAUTHN_CREDENTIAL_EX

type RawCredentialList

type RawCredentialList struct {
	Credentials uint32 // DWORD cCredentials;
	// _Field_size_            (cCredentials)
	CredentialsPtr *RawCredentialEX // PWEBAUTHN_CREDENTIAL_EX *ppCredentials
}

RawCredentialList is the information about credential list with extra information

_WEBAUTHN_CREDENTIAL_LIST

type RawCredentials

type RawCredentials struct {
	CredentialsLen uint32 // DWORD cCredentials;
	// _Field_size_(cCredentials)
	CredentialsPtr *RawCredential // PWEBAUTHN_CREDENTIAL pCredentials;
}

RawCredentials is the information about credentials.

_WEBAUTHN_CREDENTIALS

type RawExtension

type RawExtension struct {
	Identifier *uint16 // LPCWSTR pwszExtensionIdentifier
	ID         uint32  // DWORD               cbExtension
	Ptr        uintptr // PVOID               pvExtension
}

RawExtension contains information about an extension.

func (*RawExtension) DeRaw

func (c *RawExtension) DeRaw() *Extension

type RawExtensions

type RawExtensions struct {
	ExtensionsLen uint32 // DWORD cExtensions;
	// _Field_size_(cExtensions)
	ExtensionsPrt *RawExtension // PWEBAUTHN_EXTENSION pExtensions;
}

RawExtensions contains a list of extensions

func (*RawExtensions) DeRaw

func (c *RawExtensions) DeRaw() Extensions

type RawGetCredentialsOptions

type RawGetCredentialsOptions struct {
	// Version of this structure, to allow for modifications in the future.
	Version uint32 // DWORD dwVersion

	// Optional.
	RPID *uint16 // LPCWSTR pwszRpId

	// Optional. BrowserInPrivate Mode. Defaulting to FALSE.
	BrowserInPrivateMode bool // BOOL bBrowserInPrivateMode
}

RawGetCredentialsOptions for WebAuthNGetPlatformCredentialList API

type RawHMACSecretSalt

type RawHMACSecretSalt struct {
	// Size of pbFirst.
	FirstLen uint32 // DWORD              cbFirst
	// _Field_size_bytes_ (cbFirst)
	FirstPtr *byte // PBYTE              pbFirst // Required

	// Size of pbSecond.
	SecondLen uint32 // DWORD              cbSecond
	// _Field_size_bytes_ (cbSecond)
	SecondPtr *byte // PBYTE              pbSecond
}

RawHMACSecretSalt ...

_WEBAUTHN_HMAC_SECRET_SALT

func (*RawHMACSecretSalt) DeRaw

func (c *RawHMACSecretSalt) DeRaw() *HMACSecretSalt

DeRaw ...

type RawHMACSecretSaltValues

type RawHMACSecretSaltValues struct {
	GlobalHmacSalt *RawHMACSecretSalt // PWEBAUTHN_HMAC_SECRET_SALT pGlobalHmacSalt

	CredWithHMACSecretSaltListLen uint32 // DWORD  cCredWithHmacSecretSaltList
	// _Field_size_                         (cCredWithHmacSecretSaltList)
	CredWithHMACSecretSaltListPtr *RawCredWithHMACSecretSalt // PWEBAUTHN_CRED_WITH_HMAC_SECRET_SALT pCredWithHmacSecretSaltList
}

RawHMACSecretSaltValues ...

_WEBAUTHN_HMAC_SECRET_SALT_VALUES

type RawRPInfo

type RawRPInfo struct {
	// Version of this structure, to allow for modifications in the future.
	// This field is required and should be set to CURRENT_VERSION above.
	Version uint32 //DWORD dwVersion;

	// Identifier for the RP. This field is required.
	ID *uint16 // PCWSTR pwszId;

	// Contains the friendly name of the Relying Party, such as "Acme Corporation", "Widgets Inc" or "Awesome Site".
	// This field is required.
	Name *uint16 // PCWSTR pwszName

	// Optional URL pointing to RP's logo.
	Icon *uint16 // PCWSTR pwszIcon
}

RawRPInfo is the information about an RP Entity

_WEBAUTHN_RP_ENTITY_INFORMATION

func (*RawRPInfo) DeRaw

func (c *RawRPInfo) DeRaw() *RPInfo

DeRaw ...

type RawUserInfo

type RawUserInfo struct {
	// Version of this structure, to allow for modifications in the future.
	// This field is required and should be set to CURRENT_VERSION above.
	Version uint32 // DWORD dwVersion;

	// Identifier for the User. This field is required.
	IDLen uint32 // DWORD              cbId
	// _Field_size_bytes_(cbId)
	IDPtr *byte // PBYTE              pbId

	// Contains a detailed name for this account, such as "[email protected]".
	Name *uint16 // PCWSTR pwszName

	// Optional URL that can be used to retrieve an image containing the user's current avatar,
	// or a data URI that contains the image data.
	Icon *uint16 // PCWSTR pwszIcon

	// For User: Contains the friendly name associated with the user account by the Relying Party, such as "John P. Smith".
	DisplayName *uint16 // PCWSTR pwszDisplayName
}

RawUserInfo is the information about an User Entity

_WEBAUTHN_USER_ENTITY_INFORMATION

func (*RawUserInfo) DeRaw

func (c *RawUserInfo) DeRaw() *UserInfo

DeRaw ...

type RawX5C

type RawX5C struct {
	// Length of X.509 encoded certificate
	DataLen uint32 // DWORD cbData;
	// X.509 encoded certificate bytes
	// _Field_size_bytes_(cbData)
	DataPtr *byte // PBYTE pbData;
}

RawX5C is the X.509 certificate chain.

func (*RawX5C) DeRaw

func (c *RawX5C) DeRaw() X5C

type UserInfo

type UserInfo struct {
	// Version of this structure, to allow for modifications in the future.
	// This field is required and should be set to CURRENT_VERSION above.
	Version uint32 // DWORD dwVersion;

	ID []byte // PBYTE              pbId

	// Contains a detailed name for this account, such as "[email protected]".
	Name string

	// Optional URL that can be used to retrieve an image containing the user's current avatar,
	// or a data URI that contains the image data.
	Icon string

	// For User: Contains the friendly name associated with the user account by the Relying Party, such as "John P. Smith".
	DisplayName string
}

UserInfo is the information about an User Entity

type X5C

type X5C []byte

X5C is the X.509 certificate chain.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL