Safe Haskell | None |
---|---|
Language | Haskell2010 |
Mozilla Persona (formerly BrowserID) types.
- data RelativeURI
- parseRelativeURI :: String -> Maybe RelativeURI
- newtype DelegatedSupportDocument = DelegatedSupportDocument String
- authority :: Iso' DelegatedSupportDocument String
- data SupportDocument
- publicKey :: Lens' SupportDocument JWK'
- authentication :: Lens' SupportDocument RelativeURI
- provisioning :: Lens' SupportDocument RelativeURI
- supportDocument :: JWK' -> RelativeURI -> RelativeURI -> Maybe SupportDocument
- data Principal
- certify :: CPRG g => g -> JWK' -> StringOrURI -> UTCTime -> Integer -> Value -> Principal -> (Either Error JWT, g)
- provisioningApiJsUrl :: String
- authenticationApiJsUrl :: String
Documentation
data RelativeURI Source
Newtype of URI resticted to relative URIs.
parseRelativeURI :: String -> Maybe RelativeURI Source
Construct a RelativeURI
newtype DelegatedSupportDocument Source
Delegated support document
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.
Persona identity principal
TODO: actually restrict to email addresses or hostnames.
:: 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.