persona-0.1.0.0: Persona (BrowserID) library

Safe HaskellNone
LanguageHaskell2010

Crypto.Persona

Description

Mozilla Persona (formerly BrowserID) types.

Synopsis

Documentation

data RelativeURI Source

Newtype of URI resticted to relative URIs.

data SupportDocument Source

Basic support document.

See https:/developer.mozilla.orgen-USPersona.well-known-browserid.

supportDocument :: JWK' -> RelativeURI -> RelativeURI -> Maybe SupportDocument Source

Construct a SupportDocument

The smart constructor is needed to ensure that any private key material is stripped from the key. Although RSA keys always have public material the result is a 'Maybe SupportDocument' to enable a move to the JSON Web Key (JWK) format.

data Principal Source

Persona identity principal

TODO: actually restrict to email addresses or hostnames.

certify Source

Arguments

:: CPRG g 
=> g 
-> JWK'

Signing key

-> StringOrURI

Issuer

-> UTCTime

Current time. Will be used for the "iat" claim and in the calculation of the "exp" claim.

-> Integer

Requested duration. Will be used in the calculation of the "exp" claim.

-> Value

User public key object

-> Principal

Principal

-> (Either Error JWT, g) 

Create an identity assertion.

provisioningApiJsUrl :: String Source

URI to official provisioning JavaScript.

authenticationApiJsUrl :: String Source

URI to official authentication JavaScript.