import requests
from requests_gpgauthlib import GPGAuthSession
from requests_gpgauthlib.utils import create_gpg, get_workdir, import_user_private_key_from_file
SERVER_URL = 'https://demo.passbolt.com'
SERVER_FINGERPRINT = '6810A8F7728F4A7CE936F93BA27743FA0C9E83E0'
gpg = create_gpg(get_workdir())
import_user_private_key_from_file(gpg, '~/Downloads/passbolt_private.asc')
ga = GPGAuthSession(
gpg=gpg,
server_url=SERVER_URL,
auth_uri='/auth/'
)
assert ga.server_fingerprint == SERVER_FINGERPRINT
ga.authenticate()
all_resources = ga.get(ga.get_absolute_uri('/resources.json'), params={'contain[secret]': 1}).json()['body']
print(all_resources)
forked from liip/requests_gpgauthlib
-
Notifications
You must be signed in to change notification settings - Fork 1
A GPGAuth Client in Python
License
3guboff/requests_gpgauthlib
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A GPGAuth Client in Python
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- Python 100.0%