Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data BuildTokenParams = BuildTokenParams {
- btpClaims :: !Claims
- btpFooter :: !(Maybe Footer)
- btpImplicitAssertion :: !(Maybe ImplicitAssertion)
- getDefaultBuildTokenParams :: IO BuildTokenParams
- newtype V3LocalBuildError = V3LocalBuildEncryptionError EncryptionError
- renderV3LocalBuildError :: V3LocalBuildError -> Text
- buildTokenV3Local :: BuildTokenParams -> SymmetricKey V3 -> ExceptT V3LocalBuildError IO (Token V3 Local)
- newtype V3PublicBuildError = V3PublicBuildSigningError SigningError
- renderV3PublicBuildError :: V3PublicBuildError -> Text
- buildTokenV3Public :: BuildTokenParams -> SigningKey V3 -> ExceptT V3PublicBuildError IO (Token V3 Public)
- buildTokenV4Local :: BuildTokenParams -> SymmetricKey V4 -> IO (Token V4 Local)
- buildTokenV4Public :: BuildTokenParams -> SigningKey V4 -> Token V4 Public
Documentation
data BuildTokenParams Source #
Parameters for building a PASETO token.
BuildTokenParams | |
|
Instances
Show BuildTokenParams Source # | |
Defined in Crypto.Paseto.Token.Build showsPrec :: Int -> BuildTokenParams -> ShowS # show :: BuildTokenParams -> String # showList :: [BuildTokenParams] -> ShowS # | |
Eq BuildTokenParams Source # | |
Defined in Crypto.Paseto.Token.Build (==) :: BuildTokenParams -> BuildTokenParams -> Bool # (/=) :: BuildTokenParams -> BuildTokenParams -> Bool # |
getDefaultBuildTokenParams :: IO BuildTokenParams Source #
Get parameters for building a PASETO token which includes the recommended default claims.
This includes the following default claims:
- An
ExpirationClaim
of 1 hour from the current system time. - An
IssuedAtClaim
of the current system time. - A
NotBeforeClaim
of the current system time.
The default Footer
and ImplicitAssertion
is Nothing
.
newtype V3LocalBuildError Source #
Error building a version 3 local PASETO token.
V3LocalBuildEncryptionError EncryptionError | Encryption error. |
Instances
Show V3LocalBuildError Source # | |
Defined in Crypto.Paseto.Token.Build showsPrec :: Int -> V3LocalBuildError -> ShowS # show :: V3LocalBuildError -> String # showList :: [V3LocalBuildError] -> ShowS # | |
Eq V3LocalBuildError Source # | |
Defined in Crypto.Paseto.Token.Build (==) :: V3LocalBuildError -> V3LocalBuildError -> Bool # (/=) :: V3LocalBuildError -> V3LocalBuildError -> Bool # |
renderV3LocalBuildError :: V3LocalBuildError -> Text Source #
Render a V3LocalBuildError
as Text
.
buildTokenV3Local :: BuildTokenParams -> SymmetricKey V3 -> ExceptT V3LocalBuildError IO (Token V3 Local) Source #
Build a version 3 local token.
newtype V3PublicBuildError Source #
Error building a version 3 public PASETO token.
V3PublicBuildSigningError SigningError | Cryptographic signing error. |
Instances
Show V3PublicBuildError Source # | |
Defined in Crypto.Paseto.Token.Build showsPrec :: Int -> V3PublicBuildError -> ShowS # show :: V3PublicBuildError -> String # showList :: [V3PublicBuildError] -> ShowS # | |
Eq V3PublicBuildError Source # | |
Defined in Crypto.Paseto.Token.Build (==) :: V3PublicBuildError -> V3PublicBuildError -> Bool # (/=) :: V3PublicBuildError -> V3PublicBuildError -> Bool # |
renderV3PublicBuildError :: V3PublicBuildError -> Text Source #
Render a V3PublicBuildError
as Text
.
buildTokenV3Public :: BuildTokenParams -> SigningKey V3 -> ExceptT V3PublicBuildError IO (Token V3 Public) Source #
Build a version 3 public token.
buildTokenV4Local :: BuildTokenParams -> SymmetricKey V4 -> IO (Token V4 Local) Source #
Build a version 4 local token.
buildTokenV4Public :: BuildTokenParams -> SigningKey V4 -> Token V4 Public Source #
Build a version 4 public token.