@classmethod
def _check_otp_type(cls, type):
    """
        validate otp URI type is supported.
        returns True or raises appropriate error.
        """
    if type == 'totp':
        return True
    if type == 'hotp':
        raise NotImplementedError('HOTP not supported')
    raise ValueError('unknown otp type: %r' % type)
