| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Crypto.Persona
Description
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
parseRelativeURI :: String -> Maybe RelativeURI Source
Construct a RelativeURI
newtype DelegatedSupportDocument Source
Delegated support document
Constructors
| DelegatedSupportDocument String |
data SupportDocument Source
Basic support document.
See https:/developer.mozilla.orgen-USPersona.well-known-browserid.
Instances
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.
Constructors
| EmailPrincipal Text | |
| HostPrincipal Text |
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.