Copyright | (c) 2018 Chris D'Aloisio |
---|---|
License | MPL-2.0 |
Maintainer | chris.daloisio@bellroy.com |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Contains helpers for generating a token signature for SuiteTalk authentication
Synopsis
- generateSignature :: ConsumerSecret -> TokenSecret -> Account -> ConsumerKey -> TokenId -> Nonce -> Timestamp -> Signature
- generateNonce :: IO String
- getCurrentTime :: IO Timestamp
- generateSignatureKey :: ConsumerSecret -> TokenSecret -> ByteString
- generateSignatureData :: Account -> ConsumerKey -> TokenId -> Nonce -> Timestamp -> ByteString
Signature generation
generateSignature :: ConsumerSecret -> TokenSecret -> Account -> ConsumerKey -> TokenId -> Nonce -> Timestamp -> Signature Source #
Create a Signature to be used with Netsuite SOAP requests with HMAC SHA1 algorithm
generateNonce :: IO String Source #
Generates a random alpha-numeric string of 20 characters for the request nonce
getCurrentTime :: IO Timestamp Source #
Gets the current time in seconds
generateSignatureKey :: ConsumerSecret -> TokenSecret -> ByteString Source #
Create signature key according to SuiteTalk documentation (interalating with &
)
generateSignatureData :: Account -> ConsumerKey -> TokenId -> Nonce -> Timestamp -> ByteString Source #
Create signature data according to SuiteTalk documentation (interalating with &
)