geofront.backends.github — GitHub organization and key store¶
- class geofront.backends.github.GitHubKeyStore¶
Use GitHub account’s public keys as key store.
- class geofront.backends.github.GitHubOrganization(client_id: str, client_secret: str, org_login: str)¶
Authenticate team membership through GitHub, and authorize to access GitHub key store.
Note that group identifiers list_groups() method returns are GitHub team slugs. You can find what team slugs are there in the organization using GitHub API:
$ curl -u YourUserLogin https://api.github.com/orgs/YourOrgLogin/teams Enter host password for user 'YourUserLogin': [ { "name": "Owners", "id": 111111, "slug": "owners", "permission": "admin", "url": "https://api.github.com/teams/111111", ... }, { "name": "Programmers", "id": 222222, "slug": "programmers", "permission": "pull", "url": "https://api.github.com/teams/222222", ... } ]
In the above example, owners and programmers are team slugs.
Parameters: - client_id (str) – github api client id
- client_secret (str) – github api client secret
- org_login (str) – github org account name. for example 'spoqa' in https://github.com/spoqa
- geofront.backends.github.request(access_token, url: str, method: str='GET', data: bytes=None)¶
Make a request to GitHub API, and then return the parsed JSON result.
Parameters: