newClient returns a minimal fosite.Client matching the row seedClient inserts. We only need the methods fosite reads during the storage path; the storage adapter re-hydrates the canonical row on lookup.
(id string)
| 70 | // inserts. We only need the methods fosite reads during the storage |
| 71 | // path; the storage adapter re-hydrates the canonical row on lookup. |
| 72 | func newClient(id string) (*oauth.Client, error) { |
| 73 | return &oauth.Client{ |
| 74 | ID: id, |
| 75 | Name: "test client", |
| 76 | RedirectURIs: []string{"http://localhost/cb"}, |
| 77 | GrantTypeStrings: []string{"authorization_code", "refresh_token"}, |
| 78 | ResponseTypeStrings: []string{"code"}, |
| 79 | ScopeStrings: []string{"mcp"}, |
| 80 | Public: true, |
| 81 | TokenEndpointAuthMethodS: "none", |
| 82 | }, nil |
| 83 | } |
| 84 | |
| 85 | func setup(t *testing.T) (*oauth.Storage, *identity.Store, *pgxpool.Pool, string, string) { |
| 86 | t.Helper() |