feat(19.4-01): neutral wristband resource default and OIDC provider docs
- DefaultOptions().Resource is empty; comments name the host application, no consuming application (folded todo) - Tests set an explicit neutral resource; TestDefaultOptionsResourceEmpty - wristband README: new summary, two flavours, OIDC usage, API reference, OIDC defaults, dependencies, testing; root README row matches - docs/services/oauth-server.md: OpenID Connect provider section; Resource described as required with an empty default - ExampleNewOIDCServer and the newOIDCServer docs region
This commit is contained in:
@@ -386,7 +386,7 @@ func TestTokenResourceMismatchIsInvalidGrant(t *testing.T) {
|
||||
srv := newTestServer(backend)
|
||||
insertTokenTestClient(backend, "cli-res", "none", nil, nil)
|
||||
verifier, challenge := s256Pair(t)
|
||||
res := "https://mcp.plytarium.com/mcp"
|
||||
res := "https://resource.example.test/mcp"
|
||||
rawCode, _ := insertTokenTestCode(t, backend, "cli-res", challenge, func(rec *AuthCodeRecord) {
|
||||
rec.Resource = &res
|
||||
})
|
||||
@@ -404,7 +404,7 @@ func TestTokenResourceOmittedIsAccepted(t *testing.T) {
|
||||
srv := newTestServer(backend)
|
||||
insertTokenTestClient(backend, "cli-res-omit", "none", nil, nil)
|
||||
verifier, challenge := s256Pair(t)
|
||||
res := "https://mcp.plytarium.com/mcp"
|
||||
res := "https://resource.example.test/mcp"
|
||||
rawCode, _ := insertTokenTestCode(t, backend, "cli-res-omit", challenge, func(rec *AuthCodeRecord) {
|
||||
rec.Resource = &res
|
||||
})
|
||||
@@ -477,8 +477,8 @@ func TestTokenCodeSequentialReplayIsInvalidGrantSecondTime(t *testing.T) {
|
||||
// exchange the same code must produce exactly one 200 and one invalid_grant,
|
||||
// never two successes. memoryBackend serializes the whole WithinTx closure
|
||||
// behind one mutex (08-PATTERNS.md), which is exactly the seam this test
|
||||
// exercises; the real-Postgres row-lock proof lives in fonoteka.go's
|
||||
// classes/auth package.
|
||||
// exercises; the real-Postgres row-lock proof lives in the host application's
|
||||
// storage adapter.
|
||||
func TestTokenCodeConcurrentReplayHasExactlyOneWinner(t *testing.T) {
|
||||
srv, _, verifier, rawCode, _ := newTokenExchangeFixture(t)
|
||||
form := validExchangeForm(rawCode, verifier, "cli-tok")
|
||||
@@ -972,7 +972,7 @@ func TestServerRevokeKillsAccessAndLineage(t *testing.T) {
|
||||
|
||||
func TestTokenBackendUnavailableIsOpaque500(t *testing.T) {
|
||||
opts := DefaultOptions()
|
||||
opts.Issuer = "https://plytarium.com"
|
||||
opts.Issuer = "https://issuer.example.test"
|
||||
srv := NewServer(opts)
|
||||
req := tokenRequest(url.Values{"grant_type": {"authorization_code"}}, "")
|
||||
rec := httptest.NewRecorder()
|
||||
|
||||
Reference in New Issue
Block a user