glirc-2.40.1: Console IRC client
Safe HaskellSafe-Inferred
LanguageHaskell2010

Client.Authentication.Scram

Synopsis

Transaction state types

data Phase1 Source #

SCRAM state waiting for server-first-message

data Phase2 Source #

SCRAM state waiting for server-final-message

Transaction step functions

initiateScram Source #

Arguments

:: ScramDigest 
-> ByteString

authentication ID

-> ByteString

authorization ID

-> ByteString

password

-> ByteString

nonce

-> (AuthenticatePayload, Phase1) 

Construct client-first-message and extra parameters needed for addServerFirst.

addServerFirst Source #

Arguments

:: Phase1

output of initiateScram

-> ByteString

server first message

-> Maybe (AuthenticatePayload, Phase2) 

Add server-first-message to current SCRAM transaction, compute client-final-message and next state for addServerFinal.

addServerFinal Source #

Arguments

:: Phase2

output of addServerFirst

-> ByteString

server-final-message

-> Bool

transaction succeeded?

Add server-final-message to transaction and compute validatity of the whole transaction.

Digests