spakky-oauth 11.0.0__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.
@@ -0,0 +1,179 @@
1
+ Metadata-Version: 2.3
2
+ Name: spakky-oauth
3
+ Version: 11.0.0
4
+ Summary: OAuth 2.0 client plugin for Spakky framework (authorization code + PKCE, token refresh)
5
+ Author: Spakky
6
+ Author-email: Spakky <sejong418@icloud.com>
7
+ License: MIT
8
+ Requires-Dist: httpx>=0.28.1
9
+ Requires-Dist: pydantic-settings>=2.13.1
10
+ Requires-Dist: spakky>=11.0.0
11
+ Requires-Python: >=3.12
12
+ Description-Content-Type: text/markdown
13
+
14
+ # spakky-oauth
15
+
16
+ > `spakky-oauth`는 application이 사용자를 대신해 외부 API를 부를 때 쓰는 OAuth 2.0 public client 플러그인입니다.
17
+ > Authorization code + PKCE로 token을 받고, 만료 전에 갱신하고, 로그아웃 시 폐기합니다.
18
+
19
+ `spakky-oidc`와 방향이 반대입니다. `spakky-oidc`는 들어오는 bearer token을 검증하고,
20
+ `spakky-oauth`는 나가는 호출에 쓸 token을 얻어 보관합니다.
21
+
22
+ ## 제공 기능
23
+
24
+ - Authorization code flow 시작: `state`, PKCE `S256` challenge, `openid` scope가 있으면 `nonce` 생성
25
+ - Callback code 교환과 token 저장
26
+ - 만료 `refresh_leeway_seconds` 전 갱신, refresh token 회전 반영
27
+ - 같은 주체의 동시 갱신을 하나로 묶는 process-local 잠금
28
+ - 다른 instance가 먼저 회전해 저장한 token 재사용 (best-effort; 분산 잠금은 아님)
29
+ - Revocation endpoint 호출과 local token 삭제
30
+
31
+ ## 포함하지 않는 것
32
+
33
+ - 로그인·callback HTTP route. Application의 inbound adapter(FastAPI 등)가 `OAuthClient`를 호출합니다.
34
+ - ID token 서명·claim 검증. `OAuthAuthorizationResult`가 `tokens.id_token`과 `nonce`를 돌려주므로 application이 검증합니다.
35
+ - Confidential client 인증(`client_secret`), device code, client credentials grant.
36
+ - 여러 process 사이의 분산 잠금. 저장소 구현이 필요하면 직접 제공합니다.
37
+
38
+ ## 설치
39
+
40
+ ```bash
41
+ pip install spakky-oauth
42
+ ```
43
+
44
+ ## 구성
45
+
46
+ `OAuthConfig`는 `SPAKKY_OAUTH__` prefix의 환경 변수에서 읽습니다.
47
+
48
+ ```bash
49
+ export SPAKKY_OAUTH__CLIENTS='{
50
+ "example": {
51
+ "authorization_endpoint": "https://auth.example.test/authorize",
52
+ "token_endpoint": "https://auth.example.test/token",
53
+ "revocation_endpoint": "https://auth.example.test/revoke",
54
+ "client_id": "my-app",
55
+ "scopes": ["openid", "offline_access"],
56
+ "token_parameters": {"resource": "https://api.example.test"}
57
+ }
58
+ }'
59
+ ```
60
+
61
+ ### `OAuthConfig`
62
+
63
+ | Field | 기본값 | 책임 |
64
+ |-------|--------|------|
65
+ | `clients` | `{}` | 이름별 `OAuthClientRegistration` |
66
+ | `http_timeout_seconds` | `20.0` | token·revocation 요청 timeout |
67
+ | `refresh_leeway_seconds` | `90.0` | 만료 이만큼 전에 갱신 |
68
+ | `authorization_ttl_seconds` | `600.0` | 시작한 authorization이 callback을 기다리는 시간 |
69
+
70
+ ### `OAuthClientRegistration`
71
+
72
+ | Field | 기본값 | 책임 |
73
+ |-------|--------|------|
74
+ | `authorization_endpoint` | 필수 | 사용자를 보낼 authorization URL |
75
+ | `token_endpoint` | 필수 | code 교환과 refresh endpoint |
76
+ | `revocation_endpoint` | `None` | 없으면 `revoke()`는 local token만 삭제 |
77
+ | `client_id` | 필수 | public client id |
78
+ | `scopes` | `()` | 요청할 scope |
79
+ | `authorization_parameters` | `{}` | authorization 요청에 더할 parameter |
80
+ | `token_parameters` | `{}` | code 교환과 refresh 요청에 더할 parameter |
81
+
82
+ Endpoint는 `https`여야 하며 loopback host에 한해 `http`를 허용합니다. 추가 parameter는
83
+ `client_id`, `state`, `code_verifier` 같은 protocol field를 덮어쓸 수 없습니다.
84
+
85
+ ## 저장소 등록
86
+
87
+ Plugin은 `OAuthConfig`와 `OAuthClient`만 등록합니다. Token과 authorization state 저장소는
88
+ application이 Pod로 등록합니다. 개발과 테스트에는 in-memory 구현을 쓸 수 있습니다.
89
+
90
+ ```python
91
+ from spakky.core.pod.annotations.pod import Pod
92
+ from spakky.plugins.oauth.store import (
93
+ InMemoryOAuthAuthorizationStateStore,
94
+ InMemoryOAuthTokenStore,
95
+ )
96
+
97
+
98
+ @Pod()
99
+ class DevTokenStore(InMemoryOAuthTokenStore): ...
100
+
101
+
102
+ @Pod()
103
+ class DevStateStore(InMemoryOAuthAuthorizationStateStore): ...
104
+ ```
105
+
106
+ 운영에서는 `IOAuthTokenStore`와 `IOAuthAuthorizationStateStore`를 database나 cache로 구현합니다.
107
+ In-memory 구현은 만료된 authorization을 지우지 않으므로 운영에 쓰지 않습니다.
108
+
109
+ `OAuthTokenSet`과 `OAuthPendingAuthorization`의 token과 `code_verifier`는 `SecretStr`입니다.
110
+ `model_dump_json()`은 이 값을 `**********`로 바꾸므로 그대로 저장하면 token을 잃습니다.
111
+ 저장소 구현은 `get_secret_value()`로 값을 꺼내 직접 직렬화하고, 암호화도 책임집니다.
112
+
113
+ ## 사용법
114
+
115
+ ```python
116
+ from spakky.plugins.oauth.client import OAuthClient
117
+ from spakky.plugins.oauth.error import OAuthAuthorizationRequiredError
118
+
119
+
120
+ async def login(oauth: OAuthClient, user_id: str) -> str:
121
+ request = await oauth.begin_authorization(
122
+ "example",
123
+ user_id,
124
+ "https://app.example.test/auth/callback",
125
+ )
126
+ return request.url # 사용자를 이 URL로 redirect
127
+
128
+
129
+ async def callback(oauth: OAuthClient, state: str, code: str) -> None:
130
+ # 먼저 state가 이 브라우저 session에서 시작한 값인지 대조합니다.
131
+ result = await oauth.complete_authorization(state, code)
132
+ # result.tokens.id_token과 result.nonce로 ID token을 검증합니다.
133
+
134
+
135
+ async def call_api(oauth: OAuthClient, user_id: str) -> str:
136
+ try:
137
+ return await oauth.access_token("example", user_id)
138
+ except OAuthAuthorizationRequiredError:
139
+ # 다시 로그인이 필요합니다.
140
+ raise
141
+ ```
142
+
143
+ **Callback은 반드시 로그인한 session에 묶습니다.** `begin_authorization()`이 돌려준 `state`를
144
+ 사용자의 브라우저 session에 저장하고, callback에서 받은 `state`가 그 값과 같은지 확인한 뒤
145
+ `complete_authorization()`을 호출합니다. 이 확인이 없으면 공격자가 자기 주체로 시작한 URL을
146
+ 피해자에게 열게 해 피해자의 token을 공격자 주체 아래 저장할 수 있습니다.
147
+
148
+ Resource server가 token을 401로 거절하면 그 token을 넘겨 한 번 갱신합니다.
149
+ 저장된 token이 이미 다른 token으로 바뀌었다면 갱신하지 않고 새 token을 돌려줍니다.
150
+
151
+ ```python
152
+ token = await oauth.access_token("example", user_id, rejected_token=token)
153
+ ```
154
+
155
+ Sign-in마다 client id를 발급하는 server는 `begin_authorization(..., client_id=...)`와
156
+ `complete_authorization(..., client_id=...)`로 실제 client id를 전달합니다. 요청별 추가
157
+ parameter는 `begin_authorization(..., parameters={...})`로 넘깁니다.
158
+
159
+ ## 에러
160
+
161
+ | 에러 | 의미 |
162
+ |------|------|
163
+ | `OAuthClientNotConfiguredError` | 이름에 해당하는 registration이 없음 |
164
+ | `OAuthAuthorizationRequestError` | 요청별 parameter가 protocol field를 덮어쓰거나 `client_id` override가 비어 있음 |
165
+ | `OAuthAuthorizationStateError` | callback `state`를 모르거나 이미 썼거나 만료됨 |
166
+ | `OAuthAuthorizationRequiredError` | token이 없거나 grant가 거절되어 다시 로그인해야 함 |
167
+ | `OAuthTokenEndpointError` | token endpoint가 grant 거절이 아닌 이유로 실패 |
168
+ | `OAuthTokenResponseError` | token 응답이 사용할 수 있는 bearer token이 아님 |
169
+ | `OAuthTransportError` | authorization server에 연결하지 못함 |
170
+ | `OAuthRevocationError` | local token은 삭제했지만 server에 닿지 못했거나 server가 폐기를 확인하지 않음 |
171
+
172
+ Token endpoint가 `error="invalid_grant"`로 답한 경우에만 `OAuthAuthorizationRequiredError`를 올립니다.
173
+ 그 밖의 4xx/5xx는 `OAuthTokenEndpointError`입니다. 두 경우 모두 `access_token()`은 저장된 token을
174
+ 지우지 않습니다. 다른 instance가 방금 회전해 저장하려는 token을 지우지 않기 위해서입니다.
175
+ 다시 로그인시키기 전에 저장분을 비우려면 `revoke()`를 호출합니다.
176
+
177
+ ## 라이선스
178
+
179
+ MIT
@@ -0,0 +1,166 @@
1
+ # spakky-oauth
2
+
3
+ > `spakky-oauth`는 application이 사용자를 대신해 외부 API를 부를 때 쓰는 OAuth 2.0 public client 플러그인입니다.
4
+ > Authorization code + PKCE로 token을 받고, 만료 전에 갱신하고, 로그아웃 시 폐기합니다.
5
+
6
+ `spakky-oidc`와 방향이 반대입니다. `spakky-oidc`는 들어오는 bearer token을 검증하고,
7
+ `spakky-oauth`는 나가는 호출에 쓸 token을 얻어 보관합니다.
8
+
9
+ ## 제공 기능
10
+
11
+ - Authorization code flow 시작: `state`, PKCE `S256` challenge, `openid` scope가 있으면 `nonce` 생성
12
+ - Callback code 교환과 token 저장
13
+ - 만료 `refresh_leeway_seconds` 전 갱신, refresh token 회전 반영
14
+ - 같은 주체의 동시 갱신을 하나로 묶는 process-local 잠금
15
+ - 다른 instance가 먼저 회전해 저장한 token 재사용 (best-effort; 분산 잠금은 아님)
16
+ - Revocation endpoint 호출과 local token 삭제
17
+
18
+ ## 포함하지 않는 것
19
+
20
+ - 로그인·callback HTTP route. Application의 inbound adapter(FastAPI 등)가 `OAuthClient`를 호출합니다.
21
+ - ID token 서명·claim 검증. `OAuthAuthorizationResult`가 `tokens.id_token`과 `nonce`를 돌려주므로 application이 검증합니다.
22
+ - Confidential client 인증(`client_secret`), device code, client credentials grant.
23
+ - 여러 process 사이의 분산 잠금. 저장소 구현이 필요하면 직접 제공합니다.
24
+
25
+ ## 설치
26
+
27
+ ```bash
28
+ pip install spakky-oauth
29
+ ```
30
+
31
+ ## 구성
32
+
33
+ `OAuthConfig`는 `SPAKKY_OAUTH__` prefix의 환경 변수에서 읽습니다.
34
+
35
+ ```bash
36
+ export SPAKKY_OAUTH__CLIENTS='{
37
+ "example": {
38
+ "authorization_endpoint": "https://auth.example.test/authorize",
39
+ "token_endpoint": "https://auth.example.test/token",
40
+ "revocation_endpoint": "https://auth.example.test/revoke",
41
+ "client_id": "my-app",
42
+ "scopes": ["openid", "offline_access"],
43
+ "token_parameters": {"resource": "https://api.example.test"}
44
+ }
45
+ }'
46
+ ```
47
+
48
+ ### `OAuthConfig`
49
+
50
+ | Field | 기본값 | 책임 |
51
+ |-------|--------|------|
52
+ | `clients` | `{}` | 이름별 `OAuthClientRegistration` |
53
+ | `http_timeout_seconds` | `20.0` | token·revocation 요청 timeout |
54
+ | `refresh_leeway_seconds` | `90.0` | 만료 이만큼 전에 갱신 |
55
+ | `authorization_ttl_seconds` | `600.0` | 시작한 authorization이 callback을 기다리는 시간 |
56
+
57
+ ### `OAuthClientRegistration`
58
+
59
+ | Field | 기본값 | 책임 |
60
+ |-------|--------|------|
61
+ | `authorization_endpoint` | 필수 | 사용자를 보낼 authorization URL |
62
+ | `token_endpoint` | 필수 | code 교환과 refresh endpoint |
63
+ | `revocation_endpoint` | `None` | 없으면 `revoke()`는 local token만 삭제 |
64
+ | `client_id` | 필수 | public client id |
65
+ | `scopes` | `()` | 요청할 scope |
66
+ | `authorization_parameters` | `{}` | authorization 요청에 더할 parameter |
67
+ | `token_parameters` | `{}` | code 교환과 refresh 요청에 더할 parameter |
68
+
69
+ Endpoint는 `https`여야 하며 loopback host에 한해 `http`를 허용합니다. 추가 parameter는
70
+ `client_id`, `state`, `code_verifier` 같은 protocol field를 덮어쓸 수 없습니다.
71
+
72
+ ## 저장소 등록
73
+
74
+ Plugin은 `OAuthConfig`와 `OAuthClient`만 등록합니다. Token과 authorization state 저장소는
75
+ application이 Pod로 등록합니다. 개발과 테스트에는 in-memory 구현을 쓸 수 있습니다.
76
+
77
+ ```python
78
+ from spakky.core.pod.annotations.pod import Pod
79
+ from spakky.plugins.oauth.store import (
80
+ InMemoryOAuthAuthorizationStateStore,
81
+ InMemoryOAuthTokenStore,
82
+ )
83
+
84
+
85
+ @Pod()
86
+ class DevTokenStore(InMemoryOAuthTokenStore): ...
87
+
88
+
89
+ @Pod()
90
+ class DevStateStore(InMemoryOAuthAuthorizationStateStore): ...
91
+ ```
92
+
93
+ 운영에서는 `IOAuthTokenStore`와 `IOAuthAuthorizationStateStore`를 database나 cache로 구현합니다.
94
+ In-memory 구현은 만료된 authorization을 지우지 않으므로 운영에 쓰지 않습니다.
95
+
96
+ `OAuthTokenSet`과 `OAuthPendingAuthorization`의 token과 `code_verifier`는 `SecretStr`입니다.
97
+ `model_dump_json()`은 이 값을 `**********`로 바꾸므로 그대로 저장하면 token을 잃습니다.
98
+ 저장소 구현은 `get_secret_value()`로 값을 꺼내 직접 직렬화하고, 암호화도 책임집니다.
99
+
100
+ ## 사용법
101
+
102
+ ```python
103
+ from spakky.plugins.oauth.client import OAuthClient
104
+ from spakky.plugins.oauth.error import OAuthAuthorizationRequiredError
105
+
106
+
107
+ async def login(oauth: OAuthClient, user_id: str) -> str:
108
+ request = await oauth.begin_authorization(
109
+ "example",
110
+ user_id,
111
+ "https://app.example.test/auth/callback",
112
+ )
113
+ return request.url # 사용자를 이 URL로 redirect
114
+
115
+
116
+ async def callback(oauth: OAuthClient, state: str, code: str) -> None:
117
+ # 먼저 state가 이 브라우저 session에서 시작한 값인지 대조합니다.
118
+ result = await oauth.complete_authorization(state, code)
119
+ # result.tokens.id_token과 result.nonce로 ID token을 검증합니다.
120
+
121
+
122
+ async def call_api(oauth: OAuthClient, user_id: str) -> str:
123
+ try:
124
+ return await oauth.access_token("example", user_id)
125
+ except OAuthAuthorizationRequiredError:
126
+ # 다시 로그인이 필요합니다.
127
+ raise
128
+ ```
129
+
130
+ **Callback은 반드시 로그인한 session에 묶습니다.** `begin_authorization()`이 돌려준 `state`를
131
+ 사용자의 브라우저 session에 저장하고, callback에서 받은 `state`가 그 값과 같은지 확인한 뒤
132
+ `complete_authorization()`을 호출합니다. 이 확인이 없으면 공격자가 자기 주체로 시작한 URL을
133
+ 피해자에게 열게 해 피해자의 token을 공격자 주체 아래 저장할 수 있습니다.
134
+
135
+ Resource server가 token을 401로 거절하면 그 token을 넘겨 한 번 갱신합니다.
136
+ 저장된 token이 이미 다른 token으로 바뀌었다면 갱신하지 않고 새 token을 돌려줍니다.
137
+
138
+ ```python
139
+ token = await oauth.access_token("example", user_id, rejected_token=token)
140
+ ```
141
+
142
+ Sign-in마다 client id를 발급하는 server는 `begin_authorization(..., client_id=...)`와
143
+ `complete_authorization(..., client_id=...)`로 실제 client id를 전달합니다. 요청별 추가
144
+ parameter는 `begin_authorization(..., parameters={...})`로 넘깁니다.
145
+
146
+ ## 에러
147
+
148
+ | 에러 | 의미 |
149
+ |------|------|
150
+ | `OAuthClientNotConfiguredError` | 이름에 해당하는 registration이 없음 |
151
+ | `OAuthAuthorizationRequestError` | 요청별 parameter가 protocol field를 덮어쓰거나 `client_id` override가 비어 있음 |
152
+ | `OAuthAuthorizationStateError` | callback `state`를 모르거나 이미 썼거나 만료됨 |
153
+ | `OAuthAuthorizationRequiredError` | token이 없거나 grant가 거절되어 다시 로그인해야 함 |
154
+ | `OAuthTokenEndpointError` | token endpoint가 grant 거절이 아닌 이유로 실패 |
155
+ | `OAuthTokenResponseError` | token 응답이 사용할 수 있는 bearer token이 아님 |
156
+ | `OAuthTransportError` | authorization server에 연결하지 못함 |
157
+ | `OAuthRevocationError` | local token은 삭제했지만 server에 닿지 못했거나 server가 폐기를 확인하지 않음 |
158
+
159
+ Token endpoint가 `error="invalid_grant"`로 답한 경우에만 `OAuthAuthorizationRequiredError`를 올립니다.
160
+ 그 밖의 4xx/5xx는 `OAuthTokenEndpointError`입니다. 두 경우 모두 `access_token()`은 저장된 token을
161
+ 지우지 않습니다. 다른 instance가 방금 회전해 저장하려는 token을 지우지 않기 위해서입니다.
162
+ 다시 로그인시키기 전에 저장분을 비우려면 `revoke()`를 호출합니다.
163
+
164
+ ## 라이선스
165
+
166
+ MIT
@@ -0,0 +1,88 @@
1
+ [project]
2
+ name = "spakky-oauth"
3
+ version = "11.0.0"
4
+ description = "OAuth 2.0 client plugin for Spakky framework (authorization code + PKCE, token refresh)"
5
+ readme = "README.md"
6
+ requires-python = ">=3.12"
7
+ dependencies = [
8
+ "httpx>=0.28.1",
9
+ "pydantic-settings>=2.13.1",
10
+ "spakky>=11.0.0",
11
+ ]
12
+
13
+ [project.license]
14
+ text = "MIT"
15
+
16
+ [[project.authors]]
17
+ name = "Spakky"
18
+ email = "sejong418@icloud.com"
19
+
20
+ [project.entry-points."spakky.plugins"]
21
+ spakky-oauth = "spakky.plugins.oauth.main:initialize"
22
+
23
+ [build-system]
24
+ requires = ["uv_build>=0.10.10,<0.12.0"]
25
+ build-backend = "uv_build"
26
+
27
+ [tool.uv.build-backend]
28
+ module-root = "src"
29
+ module-name = "spakky.plugins.oauth"
30
+
31
+ [tool.uv.sources.spakky]
32
+ workspace = true
33
+
34
+ [tool.pyrefly]
35
+ python-version = "3.12"
36
+ search_path = [
37
+ "src",
38
+ ".",
39
+ "../../core/spakky/src",
40
+ ]
41
+ project_excludes = [
42
+ "**/__pycache__",
43
+ "**/*.pyc",
44
+ ]
45
+
46
+ [tool.ruff]
47
+ builtins = ["_"]
48
+ cache-dir = "~/.cache/ruff"
49
+
50
+ [tool.pytest.ini_options]
51
+ pythonpath = [
52
+ "src",
53
+ "../../core/spakky/src",
54
+ ]
55
+ testpaths = "tests"
56
+ python_files = ["test_*.py"]
57
+ asyncio_mode = "auto"
58
+ markers = ["known_issue(reason): 알려진 버그"]
59
+ addopts = """
60
+ --cov
61
+ --cov-report=term
62
+ --cov-report=xml
63
+ --no-cov-on-fail
64
+ --strict-markers
65
+ --dist=load
66
+ -p no:warnings
67
+ -n auto
68
+ --spec
69
+ """
70
+ spec_test_format = "{result} {docstring_summary}"
71
+
72
+ [tool.coverage.run]
73
+ include = ["src/spakky/plugins/oauth/**/*.py"]
74
+ branch = true
75
+
76
+ [tool.coverage.report]
77
+ show_missing = true
78
+ precision = 2
79
+ fail_under = 100
80
+ skip_empty = true
81
+ exclude_lines = [
82
+ "pragma: no cover",
83
+ "def __repr__",
84
+ "raise AssertionError",
85
+ "raise NotImplementedError",
86
+ '@(abc\.)?abstractmethod',
87
+ '@(typing\.)?overload',
88
+ ]
@@ -0,0 +1,73 @@
1
+ [project]
2
+ name = "spakky-oauth"
3
+ version = "11.0.0"
4
+ description = "OAuth 2.0 client plugin for Spakky framework (authorization code + PKCE, token refresh)"
5
+ readme = "README.md"
6
+ requires-python = ">=3.12"
7
+ license = { text = "MIT" }
8
+ authors = [{ name = "Spakky", email = "sejong418@icloud.com" }]
9
+ dependencies = [
10
+ "httpx>=0.28.1",
11
+ "pydantic-settings>=2.13.1",
12
+ "spakky>=11.0.0",
13
+ ]
14
+
15
+ [project.entry-points."spakky.plugins"]
16
+ spakky-oauth = "spakky.plugins.oauth.main:initialize"
17
+
18
+ [build-system]
19
+ requires = ["uv_build>=0.10.10,<0.12.0"]
20
+ build-backend = "uv_build"
21
+
22
+ [tool.uv.build-backend]
23
+ module-root = "src"
24
+ module-name = "spakky.plugins.oauth"
25
+
26
+ [tool.pyrefly]
27
+ python-version = "3.12"
28
+ search_path = ["src", ".", "../../core/spakky/src"]
29
+ project_excludes = ["**/__pycache__", "**/*.pyc"]
30
+
31
+ [tool.ruff]
32
+ builtins = ["_"]
33
+ cache-dir = "~/.cache/ruff"
34
+
35
+ [tool.pytest.ini_options]
36
+ pythonpath = ["src", "../../core/spakky/src"]
37
+ testpaths = "tests"
38
+ python_files = ["test_*.py"]
39
+ asyncio_mode = "auto"
40
+ markers = ["known_issue(reason): 알려진 버그"]
41
+ addopts = """
42
+ --cov
43
+ --cov-report=term
44
+ --cov-report=xml
45
+ --no-cov-on-fail
46
+ --strict-markers
47
+ --dist=load
48
+ -p no:warnings
49
+ -n auto
50
+ --spec
51
+ """
52
+ spec_test_format = "{result} {docstring_summary}"
53
+
54
+ [tool.coverage.run]
55
+ include = ["src/spakky/plugins/oauth/**/*.py"]
56
+ branch = true
57
+
58
+ [tool.coverage.report]
59
+ show_missing = true
60
+ precision = 2
61
+ fail_under = 100
62
+ skip_empty = true
63
+ exclude_lines = [
64
+ "pragma: no cover",
65
+ "def __repr__",
66
+ "raise AssertionError",
67
+ "raise NotImplementedError",
68
+ "@(abc\\.)?abstractmethod",
69
+ "@(typing\\.)?overload",
70
+ ]
71
+
72
+ [tool.uv.sources]
73
+ spakky = { workspace = true }
@@ -0,0 +1,8 @@
1
+ """OAuth 2.0 client plugin identity."""
2
+
3
+ from spakky.core.application.plugin import Plugin
4
+
5
+ PLUGIN_NAME = Plugin(name="spakky-oauth")
6
+ """Plugin identifier for the OAuth 2.0 client package."""
7
+
8
+ __all__ = ["PLUGIN_NAME"]