imbi-plugin-google 2.13.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- imbi_plugin_google-2.13.3/.github/workflows/publish.yml +45 -0
- imbi_plugin_google-2.13.3/.github/workflows/test.yml +54 -0
- imbi_plugin_google-2.13.3/.gitignore +10 -0
- imbi_plugin_google-2.13.3/.pre-commit-config.yaml +38 -0
- imbi_plugin_google-2.13.3/LICENSE +29 -0
- imbi_plugin_google-2.13.3/PKG-INFO +44 -0
- imbi_plugin_google-2.13.3/README.md +25 -0
- imbi_plugin_google-2.13.3/justfile +59 -0
- imbi_plugin_google-2.13.3/pyproject.toml +118 -0
- imbi_plugin_google-2.13.3/src/imbi_plugin_google/__init__.py +7 -0
- imbi_plugin_google-2.13.3/src/imbi_plugin_google/plugin.py +276 -0
- imbi_plugin_google-2.13.3/tests/__init__.py +0 -0
- imbi_plugin_google-2.13.3/tests/test_plugin.py +254 -0
- imbi_plugin_google-2.13.3/uv.lock +2073 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
on:
|
|
3
|
+
release:
|
|
4
|
+
types: [published]
|
|
5
|
+
|
|
6
|
+
permissions:
|
|
7
|
+
id-token: write
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout repository
|
|
14
|
+
uses: actions/checkout@v6
|
|
15
|
+
with:
|
|
16
|
+
fetch-depth: 0
|
|
17
|
+
|
|
18
|
+
- name: Install uv
|
|
19
|
+
uses: astral-sh/setup-uv@v5
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
run: uv python install 3.14
|
|
23
|
+
|
|
24
|
+
- name: Build
|
|
25
|
+
run: uv build
|
|
26
|
+
|
|
27
|
+
- name: Upload dist
|
|
28
|
+
uses: actions/upload-artifact@v4
|
|
29
|
+
with:
|
|
30
|
+
name: dist
|
|
31
|
+
path: dist/
|
|
32
|
+
|
|
33
|
+
publish:
|
|
34
|
+
needs: build
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
environment: pypi
|
|
37
|
+
steps:
|
|
38
|
+
- name: Download dist
|
|
39
|
+
uses: actions/download-artifact@v4
|
|
40
|
+
with:
|
|
41
|
+
name: dist
|
|
42
|
+
path: dist/
|
|
43
|
+
|
|
44
|
+
- name: Publish package
|
|
45
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: Testing
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ "main" ]
|
|
6
|
+
paths-ignore:
|
|
7
|
+
- 'docs/**'
|
|
8
|
+
- '*.md'
|
|
9
|
+
tags-ignore: [ "*" ]
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
lint:
|
|
13
|
+
name: "Static Analysis"
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout repository
|
|
17
|
+
uses: actions/checkout@v5
|
|
18
|
+
- name: Install just
|
|
19
|
+
uses: extractions/setup-just@v2
|
|
20
|
+
with:
|
|
21
|
+
just-version: '1.47.1'
|
|
22
|
+
- name: Install uv
|
|
23
|
+
uses: astral-sh/setup-uv@v7
|
|
24
|
+
with:
|
|
25
|
+
enable-cache: true
|
|
26
|
+
- name: Run linters
|
|
27
|
+
run: just lint
|
|
28
|
+
|
|
29
|
+
test:
|
|
30
|
+
name: "Automated Tests"
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
strategy:
|
|
33
|
+
fail-fast: false
|
|
34
|
+
matrix:
|
|
35
|
+
python: [ "3.14" ]
|
|
36
|
+
steps:
|
|
37
|
+
- name: Checkout repository
|
|
38
|
+
uses: actions/checkout@v5
|
|
39
|
+
- name: Install just
|
|
40
|
+
uses: extractions/setup-just@v2
|
|
41
|
+
with:
|
|
42
|
+
just-version: '1.47.1'
|
|
43
|
+
- name: Install uv
|
|
44
|
+
uses: astral-sh/setup-uv@v7
|
|
45
|
+
with:
|
|
46
|
+
python-version: "${{ matrix.python }}"
|
|
47
|
+
enable-cache: true
|
|
48
|
+
- name: Test with python ${{ matrix.python }}
|
|
49
|
+
run: just test
|
|
50
|
+
- name: Upload Coverage
|
|
51
|
+
uses: codecov/codecov-action@v5
|
|
52
|
+
with:
|
|
53
|
+
files: ./build/coverage.xml
|
|
54
|
+
flags: unittests
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v5.0.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: trailing-whitespace
|
|
6
|
+
- id: end-of-file-fixer
|
|
7
|
+
- id: check-yaml
|
|
8
|
+
- id: check-added-large-files
|
|
9
|
+
- id: check-merge-conflict
|
|
10
|
+
- id: check-toml
|
|
11
|
+
- id: debug-statements
|
|
12
|
+
|
|
13
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
14
|
+
rev: v0.14.6
|
|
15
|
+
hooks:
|
|
16
|
+
- id: ruff-check
|
|
17
|
+
args: [--fix]
|
|
18
|
+
- id: ruff-format
|
|
19
|
+
|
|
20
|
+
- repo: https://github.com/tombi-toml/tombi-pre-commit
|
|
21
|
+
rev: v0.7.25
|
|
22
|
+
hooks:
|
|
23
|
+
- id: tombi-format
|
|
24
|
+
# uv owns uv.lock formatting; avoid tombi reflow churn
|
|
25
|
+
exclude: ^uv\.lock$
|
|
26
|
+
|
|
27
|
+
- repo: local
|
|
28
|
+
hooks:
|
|
29
|
+
- id: basedpyright
|
|
30
|
+
name: basedpyright
|
|
31
|
+
language: system
|
|
32
|
+
types: [python]
|
|
33
|
+
pass_filenames: false
|
|
34
|
+
entry: uv
|
|
35
|
+
args:
|
|
36
|
+
- run
|
|
37
|
+
- basedpyright
|
|
38
|
+
- src
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, AWeber Communications, Inc.
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: imbi-plugin-google
|
|
3
|
+
Version: 2.13.3
|
|
4
|
+
Summary: Google identity plugin for Imbi
|
|
5
|
+
Author-email: "Gavin M. Roy" <gavinr@aweber.com>
|
|
6
|
+
License: BSD-3-Clause
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Natural Language :: English
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
14
|
+
Requires-Python: >=3.14
|
|
15
|
+
Requires-Dist: httpx>=0.27
|
|
16
|
+
Requires-Dist: imbi-common==2.13.3
|
|
17
|
+
Requires-Dist: pydantic>=2
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
# imbi-plugin-google
|
|
21
|
+
|
|
22
|
+
Google identity plugin for Imbi. Implements "Sign in with Google" using the
|
|
23
|
+
OAuth 2.0 authorization-code + PKCE flow against Google's fixed endpoints
|
|
24
|
+
(no discovery round-trip). A Google Workspace domain can be enforced by
|
|
25
|
+
Google itself via the `hd` authorization parameter.
|
|
26
|
+
|
|
27
|
+
## Manifest options
|
|
28
|
+
|
|
29
|
+
| Option | Required | Description |
|
|
30
|
+
| ---------------- | -------- | ------------------------------------------------------------------------------- |
|
|
31
|
+
| `hosted_domain` | no | Restrict sign-in to a Google Workspace domain (sent as `hd`, e.g. `example.com`).|
|
|
32
|
+
| `pkce_required` | no | Use PKCE (default: `true`). |
|
|
33
|
+
| `default_scopes` | no | Space-separated default scopes (default: `openid profile email`). |
|
|
34
|
+
|
|
35
|
+
## Credentials
|
|
36
|
+
|
|
37
|
+
| Field | Required | Secret |
|
|
38
|
+
| --------------- | -------- | ------ |
|
|
39
|
+
| `client_id` | yes | no |
|
|
40
|
+
| `client_secret` | yes | yes |
|
|
41
|
+
|
|
42
|
+
## License
|
|
43
|
+
|
|
44
|
+
BSD-3-Clause.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# imbi-plugin-google
|
|
2
|
+
|
|
3
|
+
Google identity plugin for Imbi. Implements "Sign in with Google" using the
|
|
4
|
+
OAuth 2.0 authorization-code + PKCE flow against Google's fixed endpoints
|
|
5
|
+
(no discovery round-trip). A Google Workspace domain can be enforced by
|
|
6
|
+
Google itself via the `hd` authorization parameter.
|
|
7
|
+
|
|
8
|
+
## Manifest options
|
|
9
|
+
|
|
10
|
+
| Option | Required | Description |
|
|
11
|
+
| ---------------- | -------- | ------------------------------------------------------------------------------- |
|
|
12
|
+
| `hosted_domain` | no | Restrict sign-in to a Google Workspace domain (sent as `hd`, e.g. `example.com`).|
|
|
13
|
+
| `pkce_required` | no | Use PKCE (default: `true`). |
|
|
14
|
+
| `default_scopes` | no | Space-separated default scopes (default: `openid profile email`). |
|
|
15
|
+
|
|
16
|
+
## Credentials
|
|
17
|
+
|
|
18
|
+
| Field | Required | Secret |
|
|
19
|
+
| --------------- | -------- | ------ |
|
|
20
|
+
| `client_id` | yes | no |
|
|
21
|
+
| `client_secret` | yes | yes |
|
|
22
|
+
|
|
23
|
+
## License
|
|
24
|
+
|
|
25
|
+
BSD-3-Clause.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
[default]
|
|
2
|
+
[private]
|
|
3
|
+
@help:
|
|
4
|
+
just --list
|
|
5
|
+
|
|
6
|
+
[private]
|
|
7
|
+
ci: lint test
|
|
8
|
+
|
|
9
|
+
[doc("Set up your development environment")]
|
|
10
|
+
[group("Environment")]
|
|
11
|
+
setup:
|
|
12
|
+
uv sync --all-groups --all-extras --frozen
|
|
13
|
+
uv run pre-commit install --install-hooks --overwrite
|
|
14
|
+
|
|
15
|
+
[doc("Run tests")]
|
|
16
|
+
[group("Testing")]
|
|
17
|
+
test *FILES: setup
|
|
18
|
+
#!/usr/bin/env sh
|
|
19
|
+
set -e
|
|
20
|
+
env_args=""
|
|
21
|
+
if [ -f .env ]; then
|
|
22
|
+
env_args="--env-file .env"
|
|
23
|
+
fi
|
|
24
|
+
if [ -z "{{ FILES }}" ]; then
|
|
25
|
+
uv run $env_args coverage run -m pytest tests
|
|
26
|
+
uv run coverage report
|
|
27
|
+
uv run coverage xml -o build/coverage.xml
|
|
28
|
+
else
|
|
29
|
+
uv run $env_args pytest {{ FILES }}
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
[doc("Run linters")]
|
|
33
|
+
[group("Testing")]
|
|
34
|
+
lint: setup
|
|
35
|
+
uv run pre-commit run --all-files
|
|
36
|
+
|
|
37
|
+
[doc("Reformat code (optionally pass specific files)")]
|
|
38
|
+
[group("Development")]
|
|
39
|
+
format *FILES: setup
|
|
40
|
+
#!/usr/bin/env sh
|
|
41
|
+
if [ "{{ FILES }}" = '' ]; then
|
|
42
|
+
args='--all-files'
|
|
43
|
+
else
|
|
44
|
+
args='--files {{ FILES }}'
|
|
45
|
+
fi
|
|
46
|
+
uv run pre-commit run ruff-format $args
|
|
47
|
+
uv run pre-commit run tombi-format $args
|
|
48
|
+
|
|
49
|
+
[doc("Remove runtime development artifacts")]
|
|
50
|
+
[group("Environment")]
|
|
51
|
+
clean:
|
|
52
|
+
rm -f .coverage .env
|
|
53
|
+
rm -fR build
|
|
54
|
+
|
|
55
|
+
[confirm]
|
|
56
|
+
[doc("Remove caches, virtual env, and output files")]
|
|
57
|
+
[group("Environment")]
|
|
58
|
+
real-clean: clean
|
|
59
|
+
rm -fR .venv .*_cache dist
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "imbi-plugin-google"
|
|
3
|
+
version = "2.13.3"
|
|
4
|
+
description = "Google identity plugin for Imbi"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.14"
|
|
7
|
+
license = { text = "BSD-3-Clause" }
|
|
8
|
+
authors = [{ name = "Gavin M. Roy", email = "gavinr@aweber.com" }]
|
|
9
|
+
classifiers = [
|
|
10
|
+
"Development Status :: 3 - Alpha",
|
|
11
|
+
"Intended Audience :: Developers",
|
|
12
|
+
"Natural Language :: English",
|
|
13
|
+
"Operating System :: OS Independent",
|
|
14
|
+
"Programming Language :: Python :: 3",
|
|
15
|
+
"Programming Language :: Python :: 3.14",
|
|
16
|
+
]
|
|
17
|
+
dependencies = [
|
|
18
|
+
"httpx>=0.27",
|
|
19
|
+
"imbi-common==2.13.3",
|
|
20
|
+
"pydantic>=2",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
[dependency-groups]
|
|
24
|
+
dev = [
|
|
25
|
+
"basedpyright",
|
|
26
|
+
"coverage[toml]",
|
|
27
|
+
"imbi-common[server,databases]==2.13.3",
|
|
28
|
+
"pre-commit",
|
|
29
|
+
"pytest",
|
|
30
|
+
"pytest-asyncio",
|
|
31
|
+
"respx",
|
|
32
|
+
"ruff~=0.14.6",
|
|
33
|
+
]
|
|
34
|
+
dist = ["build", "twine", "wheel"]
|
|
35
|
+
|
|
36
|
+
[build-system]
|
|
37
|
+
requires = ["hatchling"]
|
|
38
|
+
build-backend = "hatchling.build"
|
|
39
|
+
|
|
40
|
+
[tool.coverage.report]
|
|
41
|
+
exclude_also = ["typing.TYPE_CHECKING"]
|
|
42
|
+
fail_under = 90
|
|
43
|
+
show_missing = true
|
|
44
|
+
|
|
45
|
+
[tool.coverage.run]
|
|
46
|
+
branch = true
|
|
47
|
+
source = ["src/imbi_plugin_google"]
|
|
48
|
+
|
|
49
|
+
[tool.hatch.build.targets.wheel]
|
|
50
|
+
packages = ["src/imbi_plugin_google"]
|
|
51
|
+
|
|
52
|
+
[tool.pyright]
|
|
53
|
+
executionEnvironments = [
|
|
54
|
+
{ root = "src" },
|
|
55
|
+
{ root = "tests", reportPrivateUsage = false },
|
|
56
|
+
]
|
|
57
|
+
deprecateTypingAliases = true
|
|
58
|
+
reportMissingSuperCall = "hint"
|
|
59
|
+
reportMissingTypeStubs = false
|
|
60
|
+
typeCheckingMode = "strict"
|
|
61
|
+
|
|
62
|
+
[tool.pytest.ini_options]
|
|
63
|
+
asyncio_mode = "auto"
|
|
64
|
+
asyncio_default_fixture_loop_scope = "function"
|
|
65
|
+
|
|
66
|
+
[tool.ruff]
|
|
67
|
+
line-length = 79
|
|
68
|
+
target-version = "py314"
|
|
69
|
+
|
|
70
|
+
[tool.ruff.format]
|
|
71
|
+
quote-style = "single"
|
|
72
|
+
|
|
73
|
+
[tool.ruff.lint]
|
|
74
|
+
select = [
|
|
75
|
+
"BLE",
|
|
76
|
+
"C4",
|
|
77
|
+
"C90",
|
|
78
|
+
"E",
|
|
79
|
+
"W",
|
|
80
|
+
"F",
|
|
81
|
+
"G",
|
|
82
|
+
"I",
|
|
83
|
+
"N",
|
|
84
|
+
"Q",
|
|
85
|
+
"S",
|
|
86
|
+
"ASYNC",
|
|
87
|
+
"B",
|
|
88
|
+
"DTZ",
|
|
89
|
+
"FURB",
|
|
90
|
+
"RUF",
|
|
91
|
+
"T20",
|
|
92
|
+
"UP",
|
|
93
|
+
]
|
|
94
|
+
ignore = [
|
|
95
|
+
"ASYNC109",
|
|
96
|
+
"N818",
|
|
97
|
+
"RSE",
|
|
98
|
+
"S105",
|
|
99
|
+
"TRY003",
|
|
100
|
+
"TRY400",
|
|
101
|
+
"UP047",
|
|
102
|
+
]
|
|
103
|
+
flake8-quotes = { inline-quotes = "single" }
|
|
104
|
+
|
|
105
|
+
[tool.ruff.lint.mccabe]
|
|
106
|
+
max-complexity = 15
|
|
107
|
+
|
|
108
|
+
[tool.ruff.lint.per-file-ignores]
|
|
109
|
+
"tests/**/*.py" = ["S"]
|
|
110
|
+
|
|
111
|
+
[tool.uv]
|
|
112
|
+
default-groups = ["dev"]
|
|
113
|
+
exclude-newer = "7 days"
|
|
114
|
+
exclude-newer-package = { "clickhouse-connect" = false, "imbi-common" = false, "imbi-plugin-aws" = false, "imbi-plugin-github" = false, "imbi-plugin-google" = false, "imbi-plugin-logzio" = false, "imbi-plugin-oidc" = false, "imbi-plugin-pagerduty" = false, "imbi-plugin-sentry" = false, "imbi-plugin-sonarqube" = false }
|
|
115
|
+
|
|
116
|
+
[[tool.uv.index]]
|
|
117
|
+
url = "https://pypi.org/simple"
|
|
118
|
+
default = true
|