linotp.tokens.qrtoken.qrtoken module¶
- class linotp.tokens.qrtoken.qrtoken.QrTokenClass(token_model_object)¶
- Bases: - TokenClass,- StatefulTokenMixin- checkOtp(passwd, counter, window, options=None)¶
- This checks the OTP value, AFTER the upper level did the checkPIN - return:
- counter of the matching OTP value. 
 
 - createChallenge(transaction_id, options)¶
- create a challenge - either for pairing or challenges when the token is activated. - we support re-activation by the means that if we are in the state ‘pairing_challenge_sent’ the activation challenge could be triggered again - Parameters
- transaction_id – scope of the challenge, will become part of the challenge url code 
- options – the request optional parameters 
 
- Returns
- tuple with (True, challenge_url, data, {}) whereby the data is a dict with - {‘message’: message, ‘user_sig’: user_sig} 
 
 - create_challenge_url(transaction_id, content_type, message, callback_url, callback_sms_number, use_compression=False, reset_url=False)¶
- creates a challenge url (looking like lseqr://chal/<base64string>) from a challenge dictionary as provided by Challanges.create_challenge in lib.challenge - the version identifier of the challenge url is currently hardcoded to 1. 
 - classmethod getClassInfo(key=None, ret='all')¶
 - classmethod getClassPrefix()¶
 - classmethod getClassType()¶
 - getInitDetail(params, user=None)¶
- to complete the token normalisation, the response of the initialiastion should be build by the token specific method, the getInitDetails 
 - getOfflineInfo()¶
 - getQRImageData(response_detail)¶
 - get_enrollment_status()¶
- provide token enrollment status 
 - isActive()¶
 - pair(pairing_data)¶
- transfers the token to a paired state using the supplied data from the pairing response - Parameters
- pairing_data – A QRTokenPairingData object 
 
 - property server_hmac_secret¶
- the server hmac secret for this specific token 
 - splitPinPass(passw)¶
 - statusValidationSuccess()¶
- callback to enable a status change, on authentication success 
 - unpair()¶
- resets the stage to ‘pairing_url_sent’ so the token can be paired again. 
 - update(params)¶