-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Web Authentication API
--
-- Web Authentication API
@package webauthn
@version 0
module WebAuthn.Types
-- | WebAuthn Relying Party
data RelyingParty
RelyingParty :: Origin -> ByteString -> Bool -> Bool -> RelyingParty
[rpOrigin] :: RelyingParty -> Origin
[rpId] :: RelyingParty -> ByteString
[rpAllowSelfAttestation] :: RelyingParty -> Bool
[rpAllowNoAttestation] :: RelyingParty -> Bool
data Origin
Origin :: Text -> Text -> Maybe Int -> Origin
[originScheme] :: Origin -> Text
[originHost] :: Origin -> Text
[originPort] :: Origin -> Maybe Int
defaultRelyingParty :: Origin -> RelyingParty
-- | state of the Token Binding protocol (unsupported)
data TokenBinding
TokenBindingUnsupported :: TokenBinding
TokenBindingSupported :: TokenBinding
TokenBindingPresent :: !Text -> TokenBinding
-- |
-- - 1. Cryptographic Challenges
--
newtype Challenge
Challenge :: ByteString -> Challenge
[rawChallenge] :: Challenge -> ByteString
data WebAuthnType
Create :: WebAuthnType
Get :: WebAuthnType
-- |
-- - 10.1. Client Data Used in WebAuthn Signatures (dictionary
-- CollectedClientData)
--
data CollectedClientData
CollectedClientData :: WebAuthnType -> Challenge -> Origin -> TokenBinding -> CollectedClientData
[clientType] :: CollectedClientData -> WebAuthnType
[clientChallenge] :: CollectedClientData -> Challenge
[clientOrigin] :: CollectedClientData -> Origin
[clientTokenBinding] :: CollectedClientData -> TokenBinding
-- |
-- - 1. Authenticator Data
--
data AuthenticatorData
AuthenticatorData :: Digest SHA256 -> Bool -> Bool -> Maybe AttestedCredentialData -> ByteString -> AuthenticatorData
[rpIdHash] :: AuthenticatorData -> Digest SHA256
[userPresent] :: AuthenticatorData -> Bool
[userVerified] :: AuthenticatorData -> Bool
[attestedCredentialData] :: AuthenticatorData -> Maybe AttestedCredentialData
[authenticatorDataExtension] :: AuthenticatorData -> ByteString
-- |
-- - 4.1. Attested Credential Data
--
data AttestedCredentialData
AttestedCredentialData :: AAGUID -> CredentialId -> CredentialPublicKey -> AttestedCredentialData
[aaguid] :: AttestedCredentialData -> AAGUID
[credentialId] :: AttestedCredentialData -> CredentialId
[credentialPublicKey] :: AttestedCredentialData -> CredentialPublicKey
-- | AAGUID of the authenticator
newtype AAGUID
AAGUID :: ByteString -> AAGUID
[unAAGUID] :: AAGUID -> ByteString
-- | credential public key encoded in COSE_Key format
newtype CredentialPublicKey
CredentialPublicKey :: ByteString -> CredentialPublicKey
[unCredentialPublicKey] :: CredentialPublicKey -> ByteString
-- | A probabilistically-unique byte sequence identifying a public key
-- credential source and its authentication assertions.
newtype CredentialId
CredentialId :: ByteString -> CredentialId
[unCredentialId] :: CredentialId -> ByteString
-- |
-- - 4.3. User Account Parameters for Credential Generation
--
data User
User :: ByteString -> Text -> User
[userId] :: User -> ByteString
[userDisplayName] :: User -> Text
data VerificationFailure
InvalidType :: VerificationFailure
MismatchedChallenge :: VerificationFailure
MismatchedOrigin :: VerificationFailure
UnexpectedPresenceOfTokenBinding :: VerificationFailure
MismatchedTokenBinding :: VerificationFailure
JSONDecodeError :: String -> VerificationFailure
CBORDecodeError :: String -> DeserialiseFailure -> VerificationFailure
MismatchedRPID :: VerificationFailure
UserNotPresent :: VerificationFailure
UserUnverified :: VerificationFailure
UnsupportedAttestationFormat :: VerificationFailure
UnsupportedAlgorithm :: Int -> VerificationFailure
MalformedPublicKey :: VerificationFailure
MalformedAuthenticatorData :: VerificationFailure
MalformedX509Certificate :: VerificationFailure
MalformedSignature :: VerificationFailure
SignatureFailure :: String -> VerificationFailure
instance GHC.Show.Show WebAuthn.Types.VerificationFailure
instance GHC.Classes.Eq WebAuthn.Types.User
instance GHC.Show.Show WebAuthn.Types.User
instance GHC.Generics.Generic WebAuthn.Types.User
instance GHC.Generics.Generic WebAuthn.Types.AttestedCredentialData
instance GHC.Classes.Eq WebAuthn.Types.AttestedCredentialData
instance GHC.Show.Show WebAuthn.Types.AttestedCredentialData
instance GHC.Classes.Eq WebAuthn.Types.AAGUID
instance GHC.Show.Show WebAuthn.Types.AAGUID
instance Codec.Serialise.Class.Serialise WebAuthn.Types.CredentialPublicKey
instance Data.Hashable.Class.Hashable WebAuthn.Types.CredentialPublicKey
instance GHC.Classes.Eq WebAuthn.Types.CredentialPublicKey
instance GHC.Show.Show WebAuthn.Types.CredentialPublicKey
instance Codec.Serialise.Class.Serialise WebAuthn.Types.CredentialId
instance Data.Hashable.Class.Hashable WebAuthn.Types.CredentialId
instance GHC.Classes.Eq WebAuthn.Types.CredentialId
instance GHC.Show.Show WebAuthn.Types.CredentialId
instance GHC.Classes.Ord WebAuthn.Types.RelyingParty
instance GHC.Classes.Eq WebAuthn.Types.RelyingParty
instance GHC.Show.Show WebAuthn.Types.RelyingParty
instance GHC.Classes.Ord WebAuthn.Types.Origin
instance GHC.Classes.Eq WebAuthn.Types.Origin
instance GHC.Show.Show WebAuthn.Types.Origin
instance GHC.Classes.Ord WebAuthn.Types.WebAuthnType
instance GHC.Classes.Eq WebAuthn.Types.WebAuthnType
instance GHC.Show.Show WebAuthn.Types.WebAuthnType
instance Codec.Serialise.Class.Serialise WebAuthn.Types.Challenge
instance Data.Hashable.Class.Hashable WebAuthn.Types.Challenge
instance GHC.Classes.Ord WebAuthn.Types.Challenge
instance GHC.Classes.Eq WebAuthn.Types.Challenge
instance GHC.Show.Show WebAuthn.Types.Challenge
instance Codec.Serialise.Class.Serialise WebAuthn.Types.User
instance Data.Aeson.Types.FromJSON.FromJSON WebAuthn.Types.AttestedCredentialData
instance Data.Aeson.Types.ToJSON.ToJSON WebAuthn.Types.AttestedCredentialData
instance Data.Aeson.Types.FromJSON.FromJSON WebAuthn.Types.AAGUID
instance Data.Aeson.Types.ToJSON.ToJSON WebAuthn.Types.AAGUID
instance Data.Aeson.Types.FromJSON.FromJSON WebAuthn.Types.CredentialPublicKey
instance Data.Aeson.Types.ToJSON.ToJSON WebAuthn.Types.CredentialPublicKey
instance Data.Aeson.Types.FromJSON.FromJSON WebAuthn.Types.CredentialId
instance Data.Aeson.Types.ToJSON.ToJSON WebAuthn.Types.CredentialId
instance Data.Aeson.Types.FromJSON.FromJSON WebAuthn.Types.CollectedClientData
instance Data.Aeson.Types.FromJSON.FromJSON WebAuthn.Types.Origin
instance Data.Aeson.Types.FromJSON.FromJSON WebAuthn.Types.WebAuthnType
instance Data.Aeson.Types.FromJSON.FromJSON WebAuthn.Types.TokenBinding
instance Data.Aeson.Types.ToJSON.ToJSON WebAuthn.Types.Challenge
instance Data.Aeson.Types.FromJSON.FromJSON WebAuthn.Types.Challenge
module WebAuthn.TPM
data Stmt
Stmt :: Int -> ByteString -> SignedExact Certificate -> ByteString -> Stmt
decode :: Term -> Decoder s Stmt
verify :: Stmt -> AuthenticatorData -> ByteString -> Digest SHA256 -> Either VerificationFailure ()
instance GHC.Show.Show WebAuthn.TPM.Stmt
module WebAuthn.Signature
data PublicKey
PubEC :: PublicKey -> PublicKey
PubRSA :: PublicKey -> PublicKey
parsePublicKey :: CredentialPublicKey -> Either VerificationFailure PublicKey
verifySig :: PublicKey -> ByteString -> ByteString -> Either VerificationFailure ()
module WebAuthn.Packed
data Stmt
Stmt :: Int -> ByteString -> Maybe (SignedExact Certificate) -> Stmt
decode :: Term -> Decoder s Stmt
verify :: Stmt -> AuthenticatorData -> ByteString -> Digest SHA256 -> Either VerificationFailure ()
instance GHC.Show.Show WebAuthn.Packed.Stmt
module WebAuthn.FIDOU2F
data Stmt
Stmt :: SignedExact Certificate -> ByteString -> Stmt
decode :: Term -> Maybe Stmt
verify :: Stmt -> AuthenticatorData -> Digest SHA256 -> Either VerificationFailure ()
instance GHC.Show.Show WebAuthn.FIDOU2F.Stmt
-- | Web Authentication API Verification library
module WebAuthn
-- | state of the Token Binding protocol (unsupported)
data TokenBinding
TokenBindingUnsupported :: TokenBinding
TokenBindingSupported :: TokenBinding
TokenBindingPresent :: !Text -> TokenBinding
data Origin
Origin :: Text -> Text -> Maybe Int -> Origin
[originScheme] :: Origin -> Text
[originHost] :: Origin -> Text
[originPort] :: Origin -> Maybe Int
-- | WebAuthn Relying Party
data RelyingParty
RelyingParty :: Origin -> ByteString -> Bool -> Bool -> RelyingParty
[rpOrigin] :: RelyingParty -> Origin
[rpId] :: RelyingParty -> ByteString
[rpAllowSelfAttestation] :: RelyingParty -> Bool
[rpAllowNoAttestation] :: RelyingParty -> Bool
defaultRelyingParty :: Origin -> RelyingParty
-- |
-- - 4.3. User Account Parameters for Credential Generation
--
data User
User :: ByteString -> Text -> User
[userId] :: User -> ByteString
[userDisplayName] :: User -> Text
-- |
-- - 1. Cryptographic Challenges
--
newtype Challenge
Challenge :: ByteString -> Challenge
[rawChallenge] :: Challenge -> ByteString
-- | Generate a cryptographic challenge (13.1).
generateChallenge :: Int -> IO Challenge
data WebAuthnType
Create :: WebAuthnType
Get :: WebAuthnType
-- |
-- - 10.1. Client Data Used in WebAuthn Signatures (dictionary
-- CollectedClientData)
--
data CollectedClientData
CollectedClientData :: WebAuthnType -> Challenge -> Origin -> TokenBinding -> CollectedClientData
[clientType] :: CollectedClientData -> WebAuthnType
[clientChallenge] :: CollectedClientData -> Challenge
[clientOrigin] :: CollectedClientData -> Origin
[clientTokenBinding] :: CollectedClientData -> TokenBinding
-- |
-- - 1. Authenticator Data
--
data AuthenticatorData
AuthenticatorData :: Digest SHA256 -> Bool -> Bool -> Maybe AttestedCredentialData -> ByteString -> AuthenticatorData
[rpIdHash] :: AuthenticatorData -> Digest SHA256
[userPresent] :: AuthenticatorData -> Bool
[userVerified] :: AuthenticatorData -> Bool
[attestedCredentialData] :: AuthenticatorData -> Maybe AttestedCredentialData
[authenticatorDataExtension] :: AuthenticatorData -> ByteString
-- |
-- - 4.1. Attested Credential Data
--
data AttestedCredentialData
AttestedCredentialData :: AAGUID -> CredentialId -> CredentialPublicKey -> AttestedCredentialData
[aaguid] :: AttestedCredentialData -> AAGUID
[credentialId] :: AttestedCredentialData -> CredentialId
[credentialPublicKey] :: AttestedCredentialData -> CredentialPublicKey
-- | AAGUID of the authenticator
newtype AAGUID
AAGUID :: ByteString -> AAGUID
[unAAGUID] :: AAGUID -> ByteString
-- | credential public key encoded in COSE_Key format
newtype CredentialPublicKey
CredentialPublicKey :: ByteString -> CredentialPublicKey
[unCredentialPublicKey] :: CredentialPublicKey -> ByteString
-- | A probabilistically-unique byte sequence identifying a public key
-- credential source and its authentication assertions.
newtype CredentialId
CredentialId :: ByteString -> CredentialId
[unCredentialId] :: CredentialId -> ByteString
data VerificationFailure
InvalidType :: VerificationFailure
MismatchedChallenge :: VerificationFailure
MismatchedOrigin :: VerificationFailure
UnexpectedPresenceOfTokenBinding :: VerificationFailure
MismatchedTokenBinding :: VerificationFailure
JSONDecodeError :: String -> VerificationFailure
CBORDecodeError :: String -> DeserialiseFailure -> VerificationFailure
MismatchedRPID :: VerificationFailure
UserNotPresent :: VerificationFailure
UserUnverified :: VerificationFailure
UnsupportedAttestationFormat :: VerificationFailure
UnsupportedAlgorithm :: Int -> VerificationFailure
MalformedPublicKey :: VerificationFailure
MalformedAuthenticatorData :: VerificationFailure
MalformedX509Certificate :: VerificationFailure
MalformedSignature :: VerificationFailure
SignatureFailure :: String -> VerificationFailure
-- |
-- - 1. Registering a New Credential
--
registerCredential :: Challenge -> RelyingParty -> Maybe Text -> Bool -> ByteString -> ByteString -> Either VerificationFailure AttestedCredentialData
-- |
-- - 2. Verifying an Authentication Assertion
--
verify :: Challenge -> RelyingParty -> Maybe Text -> Bool -> ByteString -> ByteString -> ByteString -> CredentialPublicKey -> Either VerificationFailure ()
instance GHC.Show.Show WebAuthn.AttestationStatement