Coverage for pass_import/managers/gnomeauthenticator.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.4.3, created at 2024-02-26 12:11 +0000

1# -*- encoding: utf-8 -*- 

2# pass import - Passwords importer swiss army knife 

3# Copyright (C) 2017-2024 Alexandre PUJOL <alexandre@pujol.io>. 

4# 

5 

6from pass_import.core import register_managers 

7from pass_import.formats.otp import OTP 

8 

9 

10class GnomeAuthenticator(OTP): 

11 """Importer for Gnome Authenticator in JSON format.""" 

12 name = 'gnome-auth' 

13 url = 'https://gitlab.gnome.org/World/Authenticator' 

14 hexport = 'Backup > in a plain-text JSON file' 

15 himport = 'pass import gnome-authenticator file.json' 

16 json_header = [{ 

17 'secret': str, 

18 'label': str, 

19 'digits': int, 

20 'type': str, 

21 'algorithm': str, 

22 'thumbnail': str, 

23 'last_used': int, 

24 'tags': list 

25 }] 

26 

27 

28register_managers(GnomeAuthenticator)