authsome 0.2.2__tar.gz → 0.2.2rc35__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.
- {authsome-0.2.2 → authsome-0.2.2rc35}/PKG-INFO +23 -9
- {authsome-0.2.2 → authsome-0.2.2rc35}/README.md +22 -8
- {authsome-0.2.2 → authsome-0.2.2rc35}/docs/cli.md +10 -3
- authsome-0.2.2rc35/docs/site/README.md +50 -0
- authsome-0.2.2rc35/docs/site/concepts/architecture.mdx +138 -0
- authsome-0.2.2rc35/docs/site/concepts/credential-storage.mdx +160 -0
- authsome-0.2.2rc35/docs/site/concepts/provider-registry.mdx +130 -0
- authsome-0.2.2rc35/docs/site/concepts/proxy-injection.mdx +99 -0
- authsome-0.2.2rc35/docs/site/docs.json +102 -0
- authsome-0.2.2rc35/docs/site/guides/custom-providers.mdx +181 -0
- authsome-0.2.2rc35/docs/site/guides/headless-device-code.mdx +98 -0
- authsome-0.2.2rc35/docs/site/guides/login-with-oauth.mdx +146 -0
- authsome-0.2.2rc35/docs/site/guides/profiles.mdx +103 -0
- authsome-0.2.2rc35/docs/site/guides/run-agents-with-proxy.mdx +122 -0
- authsome-0.2.2rc35/docs/site/guides/use-api-keys.mdx +107 -0
- authsome-0.2.2rc35/docs/site/index.mdx +81 -0
- authsome-0.2.2rc35/docs/site/quickstart.mdx +125 -0
- authsome-0.2.2rc35/docs/site/reference/bundled-providers.mdx +93 -0
- authsome-0.2.2rc35/docs/site/reference/cli.mdx +193 -0
- authsome-0.2.2rc35/docs/site/reference/environment-variables.mdx +120 -0
- authsome-0.2.2rc35/docs/site/reference/provider-schema.mdx +194 -0
- authsome-0.2.2rc35/docs/site/troubleshooting/doctor.mdx +134 -0
- authsome-0.2.2rc35/docs/site/troubleshooting/oauth-callbacks.mdx +133 -0
- authsome-0.2.2rc35/docs/site/troubleshooting/proxy-networking.mdx +168 -0
- authsome-0.2.2rc35/docs/site/troubleshooting/token-refresh.mdx +127 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/pyproject.toml +1 -1
- {authsome-0.2.2 → authsome-0.2.2rc35}/skills/authsome/SKILL.md +1 -1
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/__init__.py +19 -11
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/models/enums.py +1 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/cli.py +158 -32
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/utils.py +72 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/tests/auth/test_auth_layer.py +27 -9
- {authsome-0.2.2 → authsome-0.2.2rc35}/tests/common/test_cli.py +101 -6
- {authsome-0.2.2 → authsome-0.2.2rc35}/uv.lock +1 -1
- {authsome-0.2.2 → authsome-0.2.2rc35}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/.github/release-please-config.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/.github/release-please-manifest.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/.github/workflows/pr-title.yml +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/.github/workflows/publish-rc.yml +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/.github/workflows/publish.yml +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/.github/workflows/release-please.yml +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/.github/workflows/test.yml +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/.gitignore +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/.pre-commit-config.yaml +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/AGENTS.md +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/CHANGELOG.md +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/CLAUDE.md +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/CONTRIBUTING.md +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/LICENSE +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/docs/UBIQUITOUS_LANGUAGE.md +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/docs/architecture.md +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/docs/authsome-design.md +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/docs/manual-testing.md +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/docs/providers.md +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/docs/register-provider.md +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35/docs}/specs/authsome-v1.md +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/skills/authsome/evals/evals.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/__init__.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/audit/__init__.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/__init__.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/ahrefs.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/apollo.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/ashby.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/atlassian.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/beehiiv.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/brevo.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/buffer.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/calendly.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/clearbit.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/discord.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/dub.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/g2.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/github.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/gitlab.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/google.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/hubspot.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/hunter.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/instantly.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/intercom.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/keywords-everywhere.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/klaviyo-oauth.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/klaviyo.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/lemlist.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/linear.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/livestorm.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/mailchimp.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/mention-me.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/microsoft.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/notion.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/openai.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/optimizely.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/postiz.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/postmark.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/resend.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/rewardful.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/savvycal.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/semrush.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/sendgrid.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/slack.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/tolt.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/typeform.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/wistia.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/x.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/bundled_providers/zapier.json +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/flows/__init__.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/flows/api_key.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/flows/base.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/flows/bridge.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/flows/dcr_pkce.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/flows/device_code.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/flows/pkce.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/input_provider.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/models/__init__.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/models/config.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/models/connection.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/models/profile.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/models/provider.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/providers/__init__.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/auth/providers/registry.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/context.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/errors.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/proxy/__init__.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/proxy/router.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/proxy/runner.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/proxy/server.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/py.typed +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/vault/__init__.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/vault/crypto.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/src/authsome/vault/storage.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/tests/__init__.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/tests/auth/__init__.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/tests/auth/test_bridge.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/tests/auth/test_flows.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/tests/auth/test_flows_dcr_pkce.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/tests/auth/test_flows_device_code.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/tests/auth/test_flows_pkce.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/tests/auth/test_models.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/tests/auth/test_registry.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/tests/auth/test_url_template.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/tests/common/__init__.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/tests/common/test_audit.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/tests/common/test_errors.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/tests/common/test_logging.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/tests/common/test_utils.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/tests/proxy/__init__.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/tests/proxy/test_proxy.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/tests/vault/__init__.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/tests/vault/test_crypto.py +0 -0
- {authsome-0.2.2 → authsome-0.2.2rc35}/tests/vault/test_store.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: authsome
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2rc35
|
|
4
4
|
Summary: A portable local authentication library for AI agents and developer tools
|
|
5
5
|
Author-email: Manoj Bajaj <manojbajaj95@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -38,8 +38,8 @@ Description-Content-Type: text/markdown
|
|
|
38
38
|
[](https://codecov.io/gh/manojbajaj95/authsome)
|
|
39
39
|
|
|
40
40
|
```text
|
|
41
|
-
|
|
42
|
-
____ ___
|
|
41
|
+
__ __
|
|
42
|
+
____ ___ __/ /_/ /_ _________ ____ ___ ___
|
|
43
43
|
/ __ `/ / / / __/ __ \/ ___/ __ \/ __ `__ \/ _ \
|
|
44
44
|
/ /_/ / /_/ / /_/ / / (__ ) /_/ / / / / / / __/
|
|
45
45
|
\__,_/\__,_/\__/_/ /_/____/\____/_/ /_/ /_/\___/
|
|
@@ -94,8 +94,8 @@ Then agents get valid credentials on demand:
|
|
|
94
94
|
authsome get github --field access_token --show-secret
|
|
95
95
|
# → ghu_...
|
|
96
96
|
|
|
97
|
-
authsome export github
|
|
98
|
-
# →
|
|
97
|
+
export $(authsome export github)
|
|
98
|
+
# → sets GITHUB_ACCESS_TOKEN in current shell
|
|
99
99
|
|
|
100
100
|
authsome run python my_agent.py
|
|
101
101
|
# runs behind a local auth proxy that injects headers at request time
|
|
@@ -135,13 +135,27 @@ authsome list # all connections + token status
|
|
|
135
135
|
|
|
136
136
|
## Docs
|
|
137
137
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
- [
|
|
138
|
+
The full documentation site lives in [`docs/site/`](docs/site/)
|
|
139
|
+
|
|
140
|
+
- [Quickstart](docs/site/quickstart.mdx)
|
|
141
|
+
- [CLI reference](docs/site/reference/cli.mdx)
|
|
142
|
+
- [Architecture](docs/site/concepts/architecture.mdx)
|
|
143
|
+
- [Custom providers](docs/site/guides/custom-providers.mdx)
|
|
144
|
+
- [Troubleshooting](docs/site/troubleshooting/doctor.mdx)
|
|
145
|
+
|
|
146
|
+
To preview locally:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
cd docs/site
|
|
150
|
+
npm i -g mint # requires Node.js >= 20.17.0
|
|
151
|
+
mint dev
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
|
|
141
155
|
|
|
142
156
|
## Specs
|
|
143
157
|
|
|
144
|
-
- [Authsome v1](specs/authsome-v1.md)
|
|
158
|
+
- [Authsome v1](docs/specs/authsome-v1.md)
|
|
145
159
|
|
|
146
160
|
## License
|
|
147
161
|
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
[](https://codecov.io/gh/manojbajaj95/authsome)
|
|
9
9
|
|
|
10
10
|
```text
|
|
11
|
-
|
|
12
|
-
____ ___
|
|
11
|
+
__ __
|
|
12
|
+
____ ___ __/ /_/ /_ _________ ____ ___ ___
|
|
13
13
|
/ __ `/ / / / __/ __ \/ ___/ __ \/ __ `__ \/ _ \
|
|
14
14
|
/ /_/ / /_/ / /_/ / / (__ ) /_/ / / / / / / __/
|
|
15
15
|
\__,_/\__,_/\__/_/ /_/____/\____/_/ /_/ /_/\___/
|
|
@@ -64,8 +64,8 @@ Then agents get valid credentials on demand:
|
|
|
64
64
|
authsome get github --field access_token --show-secret
|
|
65
65
|
# → ghu_...
|
|
66
66
|
|
|
67
|
-
authsome export github
|
|
68
|
-
# →
|
|
67
|
+
export $(authsome export github)
|
|
68
|
+
# → sets GITHUB_ACCESS_TOKEN in current shell
|
|
69
69
|
|
|
70
70
|
authsome run python my_agent.py
|
|
71
71
|
# runs behind a local auth proxy that injects headers at request time
|
|
@@ -105,13 +105,27 @@ authsome list # all connections + token status
|
|
|
105
105
|
|
|
106
106
|
## Docs
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
- [
|
|
108
|
+
The full documentation site lives in [`docs/site/`](docs/site/)
|
|
109
|
+
|
|
110
|
+
- [Quickstart](docs/site/quickstart.mdx)
|
|
111
|
+
- [CLI reference](docs/site/reference/cli.mdx)
|
|
112
|
+
- [Architecture](docs/site/concepts/architecture.mdx)
|
|
113
|
+
- [Custom providers](docs/site/guides/custom-providers.mdx)
|
|
114
|
+
- [Troubleshooting](docs/site/troubleshooting/doctor.mdx)
|
|
115
|
+
|
|
116
|
+
To preview locally:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
cd docs/site
|
|
120
|
+
npm i -g mint # requires Node.js >= 20.17.0
|
|
121
|
+
mint dev
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
|
|
111
125
|
|
|
112
126
|
## Specs
|
|
113
127
|
|
|
114
|
-
- [Authsome v1](specs/authsome-v1.md)
|
|
128
|
+
- [Authsome v1](docs/specs/authsome-v1.md)
|
|
115
129
|
|
|
116
130
|
## License
|
|
117
131
|
|
|
@@ -14,7 +14,7 @@ All commands support `--json` for machine-readable output.
|
|
|
14
14
|
| `inspect <provider>` | Show the full provider definition schema. |
|
|
15
15
|
| `login <provider>` | Authenticate with a provider using its configured flow. |
|
|
16
16
|
| `get <provider>` | Get connection metadata (secrets redacted by default). |
|
|
17
|
-
| `export <provider>` | Export credentials in `env` or `json` format. |
|
|
17
|
+
| `export <provider>` | Export credentials in `env`, `shell`, or `json` format. |
|
|
18
18
|
| `run -- <cmd>` | Run a subprocess behind the local auth injection proxy. |
|
|
19
19
|
| `logout <provider>` | Log out of a connection and remove local state. |
|
|
20
20
|
| `revoke <provider>` | Complete reset of the provider, removing all connections and client secrets. |
|
|
@@ -97,10 +97,17 @@ authsome export <provider> [OPTIONS]
|
|
|
97
97
|
| Option | Description |
|
|
98
98
|
|--------|-------------|
|
|
99
99
|
| `--connection <name>` | Connection name (default: `default`). |
|
|
100
|
-
| `--format <fmt>` | Output format: `env` (default) or `json`. |
|
|
100
|
+
| `--format <fmt>` | Output format: `env` (default), `shell`, or `json`. |
|
|
101
101
|
|
|
102
102
|
```bash
|
|
103
|
-
|
|
103
|
+
# Output KEY=VALUE pairs (useful for chaining)
|
|
104
|
+
authsome export github --format env
|
|
105
|
+
|
|
106
|
+
# Chaining example
|
|
107
|
+
export $(authsome export github)
|
|
108
|
+
|
|
109
|
+
# Save to a .env file
|
|
110
|
+
authsome export github > .env
|
|
104
111
|
```
|
|
105
112
|
|
|
106
113
|
### `run`
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# authsome docs
|
|
2
|
+
|
|
3
|
+
The Mintlify documentation site for [authsome](https://github.com/manojbajaj95/authsome).
|
|
4
|
+
|
|
5
|
+
## Local preview
|
|
6
|
+
|
|
7
|
+
Requires Node.js `>=20.17.0`.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm i -g mint
|
|
11
|
+
mint dev
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The site renders at `http://localhost:3000` with hot reload.
|
|
15
|
+
|
|
16
|
+
## Validate before committing
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
mint broken-links # check internal links
|
|
20
|
+
mint a11y # check accessibility issues
|
|
21
|
+
mint validate # run schema + content validation
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Structure
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
docs/site/
|
|
28
|
+
docs.json Mintlify config: theme, navigation, navbar
|
|
29
|
+
index.mdx Landing page
|
|
30
|
+
quickstart.mdx First-run walkthrough
|
|
31
|
+
guides/ Task-oriented guides
|
|
32
|
+
concepts/ Architecture and core concepts
|
|
33
|
+
reference/ CLI, schema, env vars, bundled providers
|
|
34
|
+
troubleshooting/ Diagnostic pages
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Adding a page
|
|
38
|
+
|
|
39
|
+
1. Create the MDX file in the right subfolder.
|
|
40
|
+
2. Add it to the appropriate `pages` list in `docs.json` — pages not referenced in `docs.json` are hidden from the sidebar.
|
|
41
|
+
3. Run `mint dev` to preview, then `mint broken-links` and `mint validate` before opening a PR.
|
|
42
|
+
|
|
43
|
+
## Style
|
|
44
|
+
|
|
45
|
+
Match the surrounding pages:
|
|
46
|
+
|
|
47
|
+
- Sentence case for headings.
|
|
48
|
+
- Code blocks always have a language tag.
|
|
49
|
+
- Internal links use root-relative paths without file extensions: `/guides/login-with-oauth`, not `./login-with-oauth.mdx`.
|
|
50
|
+
- Prefer Mintlify components (`<Steps>`, `<CodeGroup>`, `<Tabs>`, `<Card>`, `<Columns>`, `<Tip>`, `<Warning>`) over plain Markdown when they help.
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Architecture"
|
|
3
|
+
description: "Five layers — identity, policy, vault, auth, audit — composed by an explicit orchestrator."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Authsome is layered. Each layer has one bounded responsibility. Layers do not reach sideways into other layers — explicit orchestrators compose them. This makes every layer independently testable and independently swappable.
|
|
7
|
+
|
|
8
|
+
Two deployment modes share the same layered architecture:
|
|
9
|
+
|
|
10
|
+
- **Sidecar mode** — `authsome run -- python agent.py`. Transparent credential injection through an HTTP proxy. No auth code in the agent.
|
|
11
|
+
- **Library mode** — `from authsome.context import AuthsomeContext`. A direct programmatic API.
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
agent
|
|
15
|
+
↓ HTTP request via HTTP_PROXY=localhost:<port>
|
|
16
|
+
[ sidecar ] proxy-mode orchestrator
|
|
17
|
+
↓
|
|
18
|
+
identity → signed principal chain (actor=agent, subject=user)
|
|
19
|
+
↓
|
|
20
|
+
policy → allow / deny
|
|
21
|
+
↓
|
|
22
|
+
vault → encrypted credential record
|
|
23
|
+
↓ if expired:
|
|
24
|
+
auth (low) → external token endpoint → fresh credential
|
|
25
|
+
↓
|
|
26
|
+
sidecar → vault.write(fresh credential)
|
|
27
|
+
↓
|
|
28
|
+
sidecar injects Authorization header
|
|
29
|
+
↓
|
|
30
|
+
external API
|
|
31
|
+
↓
|
|
32
|
+
audit ← append-only log entry at every step
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## The five layers
|
|
36
|
+
|
|
37
|
+
| Layer | Owns | Does not own |
|
|
38
|
+
|------|------|--------------|
|
|
39
|
+
| Identity | Agent identity, principal chain token | Credentials, access decisions, token expiry |
|
|
40
|
+
| Policy | Access control, allow/deny decisions | Credentials, token refresh, encryption |
|
|
41
|
+
| Vault | Minimal encrypted KV interface (`get`/`put`/`delete`/`list`) | OAuth, providers, expiry, refresh, policy |
|
|
42
|
+
| Auth | Token refresh, OAuth acquisition flows | Persistent storage, access decisions |
|
|
43
|
+
| Audit | Append-only event log | Decisions, credentials, request flow |
|
|
44
|
+
|
|
45
|
+
<Note>
|
|
46
|
+
Identity, Policy, and Audit are part of the long-term architecture. The current alpha implementation focuses on Vault and Auth. The CLI emits audit events to `~/.authsome/audit.log` today; identity and policy enforcement are planned.
|
|
47
|
+
</Note>
|
|
48
|
+
|
|
49
|
+
## Vault: minimal storage
|
|
50
|
+
|
|
51
|
+
The Vault is intentionally small. It exposes a generic encrypted key-value interface and nothing else.
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
vault.get(key)
|
|
55
|
+
vault.put(key, value)
|
|
56
|
+
vault.delete(key)
|
|
57
|
+
vault.list(prefix)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Vault does not know about OAuth, providers, token expiry, refresh, policy, audit, or principal-chain semantics. It stores and retrieves credential records by key. Orchestrators decide which keys to read, whether access is allowed, whether a token must be refreshed, and what should be audited.
|
|
61
|
+
|
|
62
|
+
The local backend uses encrypted SQLite under `~/.authsome/profiles/<name>/store.db`. Field-level encryption uses AES-256-GCM with a 256-bit data key and a 96-bit nonce per encryption. The data key is wrapped by either a local file (`~/.authsome/master.key`, mode `0600`) or the OS keyring.
|
|
63
|
+
|
|
64
|
+
See [Credential storage](/concepts/credential-storage) for the storage model and key namespace.
|
|
65
|
+
|
|
66
|
+
## Auth: two levels
|
|
67
|
+
|
|
68
|
+
The Auth layer has two intentionally separate surfaces.
|
|
69
|
+
|
|
70
|
+
**Low level (`auth.flows`).** A pure function. Receives expired credentials and refresh material. Calls the external token endpoint. Returns fresh credentials and updated expiry. No vault access. No side effects. Independently testable.
|
|
71
|
+
|
|
72
|
+
**High level (`AuthLayer`).** A stateful orchestrator with a vault dependency. Reads the credential from the vault, calls the stateless refresh if expired, writes the result back, returns a usable token. This is what library users call.
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
from authsome.context import AuthsomeContext
|
|
76
|
+
|
|
77
|
+
ctx = AuthsomeContext.create()
|
|
78
|
+
token = ctx.auth.get_access_token("github", connection="default")
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Acquisition flows shipped today: PKCE (RFC 7636), Device Authorization Grant (RFC 8628), Dynamic Client Registration + PKCE, and an API-key flow.
|
|
82
|
+
|
|
83
|
+
## AuthsomeContext: the orchestrator
|
|
84
|
+
|
|
85
|
+
`AuthsomeContext` is the runtime wiring container assembled once per CLI invocation. It holds `Vault`, `AuthLayer`, and `ProxyRunner` as attributes. No business logic of its own.
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
from authsome.context import AuthsomeContext
|
|
89
|
+
|
|
90
|
+
ctx = AuthsomeContext.create()
|
|
91
|
+
ctx.auth # AuthLayer
|
|
92
|
+
ctx.vault # Vault
|
|
93
|
+
ctx.proxy # ProxyRunner
|
|
94
|
+
ctx.home # Path to ~/.authsome
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Library callers use `AuthsomeContext` directly. The CLI creates one context per invocation.
|
|
98
|
+
|
|
99
|
+
## Proxy: sidecar orchestrator
|
|
100
|
+
|
|
101
|
+
In sidecar mode, the proxy runner is the orchestrator.
|
|
102
|
+
|
|
103
|
+
1. Starts the HTTP proxy on a random local port.
|
|
104
|
+
2. Spawns the agent as a subprocess with `HTTP_PROXY` set to the local proxy address.
|
|
105
|
+
3. Intercepts outbound HTTP requests from the agent.
|
|
106
|
+
4. Looks up the matching provider by `host_url`, asks the AuthLayer for fresh credentials, and injects them into the `Authorization` header.
|
|
107
|
+
5. Writes refreshed credentials back to the vault.
|
|
108
|
+
6. Tears down cleanly when the agent exits.
|
|
109
|
+
|
|
110
|
+
See [Proxy injection](/concepts/proxy-injection) for the routing contract and known limitations.
|
|
111
|
+
|
|
112
|
+
## Storage layout
|
|
113
|
+
|
|
114
|
+
```text
|
|
115
|
+
~/.authsome/
|
|
116
|
+
config.json global settings, encryption mode, active profile
|
|
117
|
+
master.key encryption key, mode 0600
|
|
118
|
+
audit.log append-only audit events
|
|
119
|
+
providers/ user-defined provider definitions
|
|
120
|
+
profiles/
|
|
121
|
+
default/
|
|
122
|
+
store.db per-profile credential store (SQLite)
|
|
123
|
+
lock advisory write lock
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Profiles isolate credential sets — for example `default`, `work`, or a profile per agent.
|
|
127
|
+
|
|
128
|
+
## Standards
|
|
129
|
+
|
|
130
|
+
| Concern | v1 |
|
|
131
|
+
|---------|-----|
|
|
132
|
+
| Token refresh | OAuth 2.0 (RFC 6749) |
|
|
133
|
+
| Browser-less OAuth | Device Authorization Grant (RFC 8628) |
|
|
134
|
+
| PKCE | RFC 7636 |
|
|
135
|
+
| Encryption at rest | AES-256-GCM, 256-bit key, 96-bit nonce |
|
|
136
|
+
| Agent identity (planned) | Ed25519, `agent://local/<name>` URIs |
|
|
137
|
+
| Principal chain (planned) | Local signed JWT, RFC 8693 later |
|
|
138
|
+
| Policy (planned) | Cedar |
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Credential storage"
|
|
3
|
+
description: "How authsome encrypts, namespaces, and locks the per-profile credential vault."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Authsome stores all credentials in a per-profile encrypted SQLite vault under `~/.authsome/`. The vault speaks a minimal key-value interface — orchestrators on top of it (`AuthLayer`, the proxy) decide which keys to read and write.
|
|
7
|
+
|
|
8
|
+
## Storage layout
|
|
9
|
+
|
|
10
|
+
```text
|
|
11
|
+
~/.authsome/
|
|
12
|
+
config.json
|
|
13
|
+
master.key # mode 0600
|
|
14
|
+
audit.log
|
|
15
|
+
providers/
|
|
16
|
+
<name>.json # user-registered providers (override bundled)
|
|
17
|
+
profiles/
|
|
18
|
+
default/
|
|
19
|
+
store.db # SQLite vault
|
|
20
|
+
lock # advisory write lock
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Profiles are independent credential namespaces. Connections in `default` are invisible to `work` and vice versa.
|
|
24
|
+
|
|
25
|
+
## Key namespace
|
|
26
|
+
|
|
27
|
+
Inside a profile's `store.db`, keys follow this shape:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
profile:<profile>:<provider>:metadata
|
|
31
|
+
profile:<profile>:<provider>:state
|
|
32
|
+
profile:<profile>:<provider>:client
|
|
33
|
+
profile:<profile>:<provider>:connection:<connection_name>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
| Key | Holds |
|
|
37
|
+
|-----|-------|
|
|
38
|
+
| `metadata` | Non-secret per-profile record: known connection names, default connection, last-used connection. |
|
|
39
|
+
| `state` | Transient per-profile state: last refresh attempt, last refresh error. |
|
|
40
|
+
| `client` | OAuth client credentials (`client_id`, encrypted `client_secret`). One per provider per profile. |
|
|
41
|
+
| `connection:<name>` | The credential record for a named connection: tokens, scopes, expiry, account info. |
|
|
42
|
+
|
|
43
|
+
Provider definitions are not stored in the vault. They live on the filesystem in `~/.authsome/providers/<name>.json` (user-registered, takes precedence) or as bundled JSON files inside the package.
|
|
44
|
+
|
|
45
|
+
## Encryption
|
|
46
|
+
|
|
47
|
+
Sensitive fields are encrypted at rest using AES-256-GCM.
|
|
48
|
+
|
|
49
|
+
| Property | Value |
|
|
50
|
+
|----------|-------|
|
|
51
|
+
| Algorithm | AES-256-GCM |
|
|
52
|
+
| Master key | 256 bits, generated on first init |
|
|
53
|
+
| Nonce | 96 bits, generated per encryption |
|
|
54
|
+
|
|
55
|
+
The master key is held by one of two backends, selected by `config.encryption.mode`:
|
|
56
|
+
|
|
57
|
+
- **`local_key`** (default) — the key is stored as base64-encoded JSON in `~/.authsome/master.key` with mode `0600`. File permissions are the only protection at rest.
|
|
58
|
+
- **`keyring`** — the key is stored in the OS keychain (macOS Keychain, GNOME Keyring, Windows Credential Manager) via the `keyring` library.
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"spec_version": 1,
|
|
63
|
+
"default_profile": "default",
|
|
64
|
+
"encryption": {
|
|
65
|
+
"mode": "local_key"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Sensitive fields
|
|
71
|
+
|
|
72
|
+
The following fields are always encrypted at rest:
|
|
73
|
+
|
|
74
|
+
- `access_token`
|
|
75
|
+
- `refresh_token`
|
|
76
|
+
- `api_key`
|
|
77
|
+
- `client_secret`
|
|
78
|
+
- ID tokens, when stored
|
|
79
|
+
- Provider-issued secrets
|
|
80
|
+
|
|
81
|
+
`client_id` is not sensitive and is stored in plaintext.
|
|
82
|
+
|
|
83
|
+
### Wire format
|
|
84
|
+
|
|
85
|
+
Each encrypted value is stored as a compact dot-separated string:
|
|
86
|
+
|
|
87
|
+
```text
|
|
88
|
+
base64(nonce) . base64(ciphertext || tag)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
For example, a sample stored ciphertext looks like:
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
8Tn9Cw7yL2pQ4Vx0.4FzM3KDGbR1X...UC7qE9wA
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
This is the format `LocalFileCrypto.encrypt` and `KeyringCrypto.encrypt` produce in `src/authsome/vault/crypto.py`.
|
|
98
|
+
|
|
99
|
+
<Note>
|
|
100
|
+
The portable spec ([`docs/specs/authsome-v1.md` §11.4](https://github.com/manojbajaj95/authsome/blob/main/docs/specs/authsome-v1.md)) defines a richer JSON envelope (`{enc, alg, kid, nonce, ciphertext, tag}`) as the cross-language interop target. The current Python implementation uses the compact format above; a future migration may switch to the JSON envelope when a second-language port lands.
|
|
101
|
+
</Note>
|
|
102
|
+
|
|
103
|
+
## The three states
|
|
104
|
+
|
|
105
|
+
Every provider in a profile is always in exactly one of three states. The state is derived at runtime from what is stored — it is not a persisted field.
|
|
106
|
+
|
|
107
|
+
| State | Meaning |
|
|
108
|
+
|------|---------|
|
|
109
|
+
| `available` | The provider definition exists. No credentials are stored for this profile. |
|
|
110
|
+
| `configured` | OAuth2 client credentials are saved for this profile. The user has not yet logged in. API-key providers skip this state. |
|
|
111
|
+
| `connected` | A valid connection record exists with an access token or API key. |
|
|
112
|
+
|
|
113
|
+
```text
|
|
114
|
+
available → configured authsome login (collects OAuth client creds)
|
|
115
|
+
configured → connected authsome login (completes auth flow)
|
|
116
|
+
available → connected authsome login (api_key providers)
|
|
117
|
+
connected → available authsome revoke or authsome remove
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
If a provider is already `connected`, `authsome login <provider>` exits with an error. Pass `--force` to overwrite an existing connection.
|
|
121
|
+
|
|
122
|
+
## Locking
|
|
123
|
+
|
|
124
|
+
Writes acquire an advisory `fcntl.flock` on the per-profile `lock` file. Multiple authsome processes can read concurrently but serialize writes within the same profile. Locks across profiles are independent.
|
|
125
|
+
|
|
126
|
+
## Connection record example
|
|
127
|
+
|
|
128
|
+
A connected GitHub OAuth2 connection on disk looks like this (with sensitive fields encrypted):
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"schema_version": 1,
|
|
133
|
+
"provider": "github",
|
|
134
|
+
"profile": "default",
|
|
135
|
+
"connection_name": "default",
|
|
136
|
+
"auth_type": "oauth2",
|
|
137
|
+
"status": "connected",
|
|
138
|
+
"scopes": ["repo", "read:user"],
|
|
139
|
+
"access_token": {
|
|
140
|
+
"enc": 1,
|
|
141
|
+
"alg": "AES-256-GCM",
|
|
142
|
+
"kid": "local",
|
|
143
|
+
"nonce": "...",
|
|
144
|
+
"ciphertext": "...",
|
|
145
|
+
"tag": "..."
|
|
146
|
+
},
|
|
147
|
+
"refresh_token": { "enc": 1, "alg": "AES-256-GCM", "...": "..." },
|
|
148
|
+
"token_type": "Bearer",
|
|
149
|
+
"expires_at": "2026-05-01T15:40:22Z",
|
|
150
|
+
"obtained_at": "2026-04-30T14:40:22Z",
|
|
151
|
+
"account": { "id": "12345", "label": "manojbajaj95" },
|
|
152
|
+
"metadata": {}
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Trust boundary
|
|
157
|
+
|
|
158
|
+
Authsome assumes the local machine and user account are trusted relative to remote services. Encryption at rest protects against offline file access (a stolen disk image or an unauthorized user reading your home directory). It does not protect against a compromised running process.
|
|
159
|
+
|
|
160
|
+
For runtime headers on the wire, see [Proxy injection](/concepts/proxy-injection).
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Provider registry"
|
|
3
|
+
description: "How authsome resolves provider definitions from bundled JSON, user overrides, and registered custom providers."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
A provider is an external service authsome can authenticate against — `github`, `google`, `openai`, and so on. Each provider is described by a JSON definition that tells authsome which authentication flow to run, where the OAuth endpoints live, and how to inject credentials into outbound requests.
|
|
7
|
+
|
|
8
|
+
The provider registry is the system that resolves a provider name to its definition.
|
|
9
|
+
|
|
10
|
+
## Resolution order
|
|
11
|
+
|
|
12
|
+
When authsome looks up a provider by name, it checks two sources in this order:
|
|
13
|
+
|
|
14
|
+
1. **User overrides** at `~/.authsome/providers/<name>.json`. These always win.
|
|
15
|
+
2. **Bundled providers** shipped inside the `authsome` package (`src/authsome/auth/bundled_providers/`).
|
|
16
|
+
|
|
17
|
+
This means you can override any bundled provider — for example, to point GitHub at a GitHub Enterprise instance, or to add custom scopes — by dropping a JSON file with the same name into `~/.authsome/providers/`.
|
|
18
|
+
|
|
19
|
+
## Provider sources
|
|
20
|
+
|
|
21
|
+
`authsome list` shows whether each provider came from the bundled set or from a user-registered file.
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
$ authsome list
|
|
25
|
+
Providers: 35 total, 2 connected
|
|
26
|
+
|
|
27
|
+
Provider Source Auth Connection Status
|
|
28
|
+
GitHub [github] bundled oauth2 default connected
|
|
29
|
+
OpenAI [openai] bundled api_key default connected
|
|
30
|
+
Acme CRM [acmecrm] custom oauth2 - not_connected
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The `--json` output exposes the same split as `bundled` and `custom` arrays.
|
|
34
|
+
|
|
35
|
+
## What a provider definition contains
|
|
36
|
+
|
|
37
|
+
Every provider definition declares:
|
|
38
|
+
|
|
39
|
+
- An identity (`name`, `display_name`).
|
|
40
|
+
- An auth type (`oauth2` or `api_key`) and a default flow (`pkce`, `device_code`, `dcr_pkce`, or `api_key`).
|
|
41
|
+
- A flow-specific config block (`oauth` or `api_key`).
|
|
42
|
+
- An optional `host_url` for proxy routing.
|
|
43
|
+
- An optional `export.env` map describing which environment variables hold which credential fields.
|
|
44
|
+
|
|
45
|
+
A minimal OAuth2 provider:
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"schema_version": 1,
|
|
50
|
+
"name": "github",
|
|
51
|
+
"display_name": "GitHub",
|
|
52
|
+
"auth_type": "oauth2",
|
|
53
|
+
"flow": "pkce",
|
|
54
|
+
"oauth": {
|
|
55
|
+
"authorization_url": "https://github.com/login/oauth/authorize",
|
|
56
|
+
"token_url": "https://github.com/login/oauth/access_token",
|
|
57
|
+
"scopes": ["repo", "read:user"],
|
|
58
|
+
"pkce": true,
|
|
59
|
+
"supports_device_flow": true,
|
|
60
|
+
"supports_dcr": false
|
|
61
|
+
},
|
|
62
|
+
"host_url": "api.github.com",
|
|
63
|
+
"export": {
|
|
64
|
+
"env": { "access_token": "GITHUB_ACCESS_TOKEN" }
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
A minimal API-key provider:
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"schema_version": 1,
|
|
74
|
+
"name": "openai",
|
|
75
|
+
"display_name": "OpenAI",
|
|
76
|
+
"auth_type": "api_key",
|
|
77
|
+
"flow": "api_key",
|
|
78
|
+
"api_key": {
|
|
79
|
+
"header_name": "Authorization",
|
|
80
|
+
"header_prefix": "Bearer"
|
|
81
|
+
},
|
|
82
|
+
"host_url": "api.openai.com",
|
|
83
|
+
"export": {
|
|
84
|
+
"env": { "api_key": "OPENAI_API_KEY" }
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
For the full schema with every field, see the [Provider schema reference](/reference/provider-schema).
|
|
90
|
+
|
|
91
|
+
## Bundled providers do not imply bundled credentials
|
|
92
|
+
|
|
93
|
+
A bundled provider definition only describes how to talk to a service. It does not include OAuth client credentials. The first time you log in to an OAuth2 provider, authsome collects your `client_id` and `client_secret` through a secure browser bridge and stores them encrypted in your profile.
|
|
94
|
+
|
|
95
|
+
For services that support Dynamic Client Registration (DCR), the `dcr_pkce` flow registers a fresh OAuth client automatically — no `client_id` collection needed.
|
|
96
|
+
|
|
97
|
+
## Multi-tenant and self-hosted providers
|
|
98
|
+
|
|
99
|
+
For services where the base URL varies per deployment (GitHub Enterprise, Okta, GitLab self-managed), the provider definition uses `oauth.base_url` as a default and `{base_url}` as a placeholder in URL fields:
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"oauth": {
|
|
104
|
+
"base_url": "https://github.com",
|
|
105
|
+
"authorization_url": "{base_url}/login/oauth/authorize",
|
|
106
|
+
"token_url": "{base_url}/login/oauth/access_token"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
During `authsome login`, the user is prompted for the base URL with the JSON value as the default. A custom base URL is saved to the profile and used for all future token refreshes on that connection.
|
|
112
|
+
|
|
113
|
+
## Adding your own providers
|
|
114
|
+
|
|
115
|
+
Two ways:
|
|
116
|
+
|
|
117
|
+
1. **Drop a file at `~/.authsome/providers/<name>.json`.** Authsome picks it up on the next CLI invocation.
|
|
118
|
+
2. **Register through the CLI.** `authsome register ./acmecrm.json` validates the JSON, copies it into `~/.authsome/providers/`, and confirms the new provider appears in `authsome list`.
|
|
119
|
+
|
|
120
|
+
See [Custom providers](/guides/custom-providers) for a full walkthrough.
|
|
121
|
+
|
|
122
|
+
## Override a bundled provider
|
|
123
|
+
|
|
124
|
+
To override a bundled provider — for example, to add a scope to GitHub — copy the bundled JSON, edit it, and place it under `~/.authsome/providers/github.json`. Authsome resolves your file first.
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
authsome inspect github > ~/.authsome/providers/github.json
|
|
128
|
+
# edit the file
|
|
129
|
+
authsome list # source now shows "custom" for github
|
|
130
|
+
```
|