sqrlserver.response module

class sqrlserver.response.Response(ver=1)

Bases: object

Class encompassing a response to a SQRL request

Keyword Arguments:
 ver (uint) – The version number for this response. Defaults to 1.
ver

uint – The version of this response.

tif

string – The hexadecimal status bits set in this response in the string format required by the spec.

params

dict – The name-value pairs currently set.

addParam(key, value)

Adds/updates the given name-value pair

hmac(key)

Computes the HMAC for the current state of the response

static load(ref)

Loads an existing response into a new one

tif

Converts the _tif property into the printable format required by the spec.

tifOff(*args)

Turns off the given status bits, if not already off.

tifOn(*args)

Turns on given status bits, if not already on.

toString()

Converts to b64u encoded string