Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ and the core server's verifier — the two halves cannot drift:

| Claim | Example | Meaning |
| --- | --- | --- |
| `sub` | `ci-bot`, `sujal@acme.com` | who this token was issued to (lands in audit logs and commit authorship) |
| `sub` | `ci-bot`, `ada@example.com` | who this token was issued to (lands in audit logs and commit authorship) |
| `org` | `acme` (`""` = admin) | org scope — same rule as static tokens: only `priompt://acme/…` |
| `rw` | `true` | may publish/branch/merge/rollback; read-only otherwise |
| `exp` / `iat` | unix seconds | always set; default TTL 15 minutes (`-ttl`) |
Expand Down
4 changes: 2 additions & 2 deletions cmd/priompt-auth/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@ func TestOIDCExchange(t *testing.T) {

exp := time.Now().Add(time.Hour)
code, tok := getToken(t, srv, url.Values{
"grant_type": {"oidc"}, "id_token": {f.idToken(t, f.srv.URL, "sujal@acme.com", []string{"acme-authors"}, exp)}})
"grant_type": {"oidc"}, "id_token": {f.idToken(t, f.srv.URL, "ada@example.com", []string{"acme-authors"}, exp)}})
if code != 200 {
t.Fatalf("valid ID token must exchange, got %d", code)
}
if c := decodeClaims(t, tok); c.Sub != "sujal@acme.com" || c.Org != "acme" || !c.RW {
if c := decodeClaims(t, tok); c.Sub != "ada@example.com" || c.Org != "acme" || !c.RW {
t.Errorf("wrong mapped claims: %+v", c)
}

Expand Down
Loading