Stability | experimental |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
This module models direct representations of JavaScript objects interacting with the
create()
and get() methods, as used by Webauthn2.
Note that these types don't encode the semantics of their values. E.g. if the JavaScript object has a DOMString
field, but only values "foo"
and "bar"
are possible, the type is still encoded as a generic DOMString
.
This allows us to match the specification very closely, deferring decoding of these values to another module.
This module also implements FromJSON
and ToJSON
instances of its types, which are compatible with
webauthn-json's JSON schema.
The defined types are
PublicKeyCredentialCreationOptions
and all its subtypes. Passed as the publicKey field to the create() method in step 2 of § 7.1 Registering a New CredentialPublicKeyCredentialRequestOptions
and all its subtypes. Passed as the publicKey field to the get() method in step 2 of § 7.2 Verifying an Authentication Assertion
and all its subtypes. Responses of the create() (in which casePublicKeyCredential
responseresponse ~
) and get() (in which caseAuthenticatorAttestationResponse
response ~
methods.AuthenticatorAssertionResponse
Synopsis
- data PublicKeyCredentialCreationOptions = PublicKeyCredentialCreationOptions {
- rp :: PublicKeyCredentialRpEntity
- user :: PublicKeyCredentialUserEntity
- challenge :: BufferSource
- pubKeyCredParams :: [PublicKeyCredentialParameters]
- timeout :: Maybe UnsignedLong
- excludeCredentials :: Maybe [PublicKeyCredentialDescriptor]
- authenticatorSelection :: Maybe AuthenticatorSelectionCriteria
- attestation :: Maybe DOMString
- extensions :: Maybe (Map Text Value)
- data PublicKeyCredentialRequestOptions = PublicKeyCredentialRequestOptions {}
- data PublicKeyCredential response = PublicKeyCredential {
- rawId :: ArrayBuffer
- response :: response
- clientExtensionResults :: Map Text Value
- data AuthenticatorAttestationResponse = AuthenticatorAttestationResponse {}
- data AuthenticatorAssertionResponse = AuthenticatorAssertionResponse {}
- data PublicKeyCredentialRpEntity = PublicKeyCredentialRpEntity {}
- data PublicKeyCredentialUserEntity = PublicKeyCredentialUserEntity {
- id :: BufferSource
- displayName :: DOMString
- name :: DOMString
- data PublicKeyCredentialParameters = PublicKeyCredentialParameters {}
- type COSEAlgorithmIdentifier = Long
- data PublicKeyCredentialDescriptor = PublicKeyCredentialDescriptor {
- littype :: DOMString
- id :: BufferSource
- transports :: Maybe [DOMString]
- data AuthenticatorSelectionCriteria = AuthenticatorSelectionCriteria {}
Top-level types
data PublicKeyCredentialCreationOptions Source #
Instances
data PublicKeyCredentialRequestOptions Source #
Instances
data PublicKeyCredential response Source #
PublicKeyCredential | |
|
Instances
Nested types
data AuthenticatorAttestationResponse Source #
AuthenticatorAttestationResponse | |
|
Instances
Eq AuthenticatorAttestationResponse Source # | |
Show AuthenticatorAttestationResponse Source # | |
Defined in Crypto.WebAuthn.Model.WebIDL.Types | |
Generic AuthenticatorAttestationResponse Source # | |
ToJSON AuthenticatorAttestationResponse Source # | |
FromJSON AuthenticatorAttestationResponse Source # | |
type Rep AuthenticatorAttestationResponse Source # | |
Defined in Crypto.WebAuthn.Model.WebIDL.Types type Rep AuthenticatorAttestationResponse = D1 ('MetaData "AuthenticatorAttestationResponse" "Crypto.WebAuthn.Model.WebIDL.Types" "webauthn-0.1.1.0-inplace" 'False) (C1 ('MetaCons "AuthenticatorAttestationResponse" 'PrefixI 'True) (S1 ('MetaSel ('Just "clientDataJSON") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ArrayBuffer) :*: (S1 ('MetaSel ('Just "attestationObject") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ArrayBuffer) :*: S1 ('MetaSel ('Just "transports") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [DOMString]))))) |
data AuthenticatorAssertionResponse Source #
Instances
data PublicKeyCredentialRpEntity Source #
Instances
data PublicKeyCredentialUserEntity Source #
Instances
data PublicKeyCredentialParameters Source #
Instances
type COSEAlgorithmIdentifier = Long Source #
data PublicKeyCredentialDescriptor Source #
Instances
data AuthenticatorSelectionCriteria Source #