@pidgeon-ai/issuer 0.1.1 → 0.2.0

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.
package/README.md CHANGED
@@ -100,6 +100,37 @@ const { site } = await signInWithPidgeon(await loadIdentity('acme.com'), {
100
100
  });
101
101
  ```
102
102
 
103
+ ## A person signs in, through your identity provider
104
+
105
+ Your staff sign in to the same sites as themselves, through your own OpenID
106
+ Connect provider (Keycloak, Auth0, Okta, Entra), with the flow Pidgeon Cloud
107
+ uses. Register the issuer at the provider as a confidential client whose
108
+ redirect URI is `https://post.acme.com/api/post/oidc/callback`, then:
109
+
110
+ ```json
111
+ "person": {
112
+ "oidc": { "issuer": "https://sso.acme.com/realms/acme", "client_id": "pidgeon-issuer" }
113
+ },
114
+ "clients": [
115
+ {
116
+ "client_id": "client_shop",
117
+ "host": "shop.example",
118
+ "redirect_uris": ["https://shop.example/api/auth/pidgeon/callback"]
119
+ }
120
+ ]
121
+ ```
122
+
123
+ with the client's secret in `PIDGEON_PERSON_CLIENT_SECRET` and a random
124
+ `PIDGEON_ISSUER_SECRET` of 32 characters or more (`openssl rand -base64 32`),
125
+ which seals the sign-in in progress and the sixty-second code, so there is
126
+ still no database. The issuer will not start without it. Rotating it only
127
+ ends the sign-ins in flight.
128
+
129
+ A site that sets `issuer: 'https://post.acme.com'` signs people in there.
130
+ The person must have a verified address at your domain that is not an
131
+ agent's; the site gets `kind: "person"`, your provider's `sub` and that
132
+ address.
133
+
103
134
  ## What it checks before it signs anything
104
135
 
105
136
  - The token request is signed by a key your identity provider gives an
@@ -113,7 +144,7 @@ const { site } = await signInWithPidgeon(await loadIdentity('acme.com'), {
113
144
 
114
145
  ## Left out
115
146
 
116
- The person's sign-in, userinfo, introspection and revocation endpoints (an ID
147
+ Userinfo, introspection and revocation endpoints (an ID
117
148
  token lasts five minutes; revoking an agent is disabling it), dynamic client
118
149
  registration, and Pidgeon's card log, which would mean sending us your agents.
119
150
  Authorization stays yours: a grant is a relation (`customer:42#refunds.issue`
package/dist/bin.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  UsageError,
4
4
  runIssuer
5
- } from "./chunk-CCOFMK5K.js";
5
+ } from "./chunk-BXZ2EI2Y.js";
6
6
 
7
7
  // src/bin.ts
8
8
  async function main() {