{"id":20148252,"url":"https://github.com/chainguard-dev/go-oidctest","last_synced_at":"2025-04-09T19:51:27.383Z","repository":{"id":43021259,"uuid":"472430105","full_name":"chainguard-dev/go-oidctest","owner":"chainguard-dev","description":"Library for creating fake OIDC providers in tests","archived":false,"fork":false,"pushed_at":"2024-05-06T16:37:13.000Z","size":34,"stargazers_count":6,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-06T17:58:26.498Z","etag":null,"topics":["go","golang","golang-testing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chainguard-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-21T16:52:58.000Z","updated_at":"2024-05-30T01:53:42.241Z","dependencies_parsed_at":"2024-05-06T17:52:56.649Z","dependency_job_id":"4c190a97-3d91-445c-b918-4243940c21df","html_url":"https://github.com/chainguard-dev/go-oidctest","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fgo-oidctest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fgo-oidctest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fgo-oidctest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fgo-oidctest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chainguard-dev","download_url":"https://codeload.github.com/chainguard-dev/go-oidctest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103901,"owners_count":21048244,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","golang-testing"],"created_at":"2024-11-13T22:36:10.817Z","updated_at":"2025-04-09T19:51:27.364Z","avatar_url":"https://github.com/chainguard-dev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-oidc-test\nLibrary for creating fake OIDC issuers in tests.\n\n## Test issuer\n\n`oidctest.NewIssuer` creates a fake OIDC issuer. It returns its signing key as\nwell as its issuer URL.\n\nExample:\n\n```go\nctx := context.Background()\n\nsigner, iss := oidctest.NewIssuer(t)\n\ntoken, err := jwt.Signed(signer).Claims(jwt.Claims{\n\tIssuer:   iss,\n\tIssuedAt: jwt.NewNumericDate(time.Now()),\n\tExpiry:   jwt.NewNumericDate(time.Now().Add(30 * time.Minute)),\n\tSubject:  \"test-subject\",\n\tAudience: jwt.Audience{\"test-audience\"},\n}).CompactSerialize()\nif err != nil {\n\tt.Fatalf(\"CompactSerialize() = %v\", err)\n}\n\n// Verify the token is valid.\nprovider, err := oidc.NewProvider(ctx, iss)\nif err != nil {\n\tt.Errorf(\"constructing %q provider: %v\", iss, err)\n}\n\nverifier := provider.Verifier(\u0026oidc.Config{SkipClientIDCheck: true})\nif _, err := verifier.Verify(ctx, token); err != nil {\n\tt.Errorf(\"verifying token: %v\", err)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainguard-dev%2Fgo-oidctest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchainguard-dev%2Fgo-oidctest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainguard-dev%2Fgo-oidctest/lists"}