@@ -167,7 +167,7 @@ func (ts *OAuthClientTestSuite) TestOAuthServerClientDynamicRegisterDisabled() {
167
167
func (ts * OAuthClientTestSuite ) TestOAuthServerClientGetHandler () {
168
168
client , _ := ts .createTestOAuthClient ()
169
169
170
- req := httptest .NewRequest (http .MethodGet , "/admin/oauth/clients/" + client .ClientID , nil )
170
+ req := httptest .NewRequest (http .MethodGet , "/admin/oauth/clients/" + client .ID . String () , nil )
171
171
172
172
ctx := WithOAuthServerClient (req .Context (), client )
173
173
req = req .WithContext (ctx )
@@ -183,7 +183,7 @@ func (ts *OAuthClientTestSuite) TestOAuthServerClientGetHandler() {
183
183
err = json .Unmarshal (w .Body .Bytes (), & response )
184
184
require .NoError (ts .T (), err )
185
185
186
- assert .Equal (ts .T (), client .ClientID , response .ClientID )
186
+ assert .Equal (ts .T (), client .ID . String () , response .ClientID )
187
187
assert .Empty (ts .T (), response .ClientSecret ) // Should NOT be included in get response
188
188
assert .Equal (ts .T (), "Test Client" , response .ClientName )
189
189
}
@@ -193,7 +193,7 @@ func (ts *OAuthClientTestSuite) TestOAuthServerClientDeleteHandler() {
193
193
client , _ := ts .createTestOAuthClient ()
194
194
195
195
// Create HTTP request with client in context
196
- req := httptest .NewRequest (http .MethodDelete , "/admin/oauth/clients/" + client .ClientID , nil )
196
+ req := httptest .NewRequest (http .MethodDelete , "/admin/oauth/clients/" + client .ID . String () , nil )
197
197
198
198
// Add client to context (normally done by LoadOAuthServerClient middleware)
199
199
ctx := WithOAuthServerClient (req .Context (), client )
@@ -208,7 +208,7 @@ func (ts *OAuthClientTestSuite) TestOAuthServerClientDeleteHandler() {
208
208
assert .Empty (ts .T (), w .Body .String ())
209
209
210
210
// Verify client was soft-deleted
211
- deletedClient , err := ts .Server .getOAuthServerClient (context .Background (), client .ClientID )
211
+ deletedClient , err := ts .Server .getOAuthServerClient (context .Background (), client .ID )
212
212
assert .Error (ts .T (), err ) // it was soft-deleted
213
213
assert .Nil (ts .T (), deletedClient )
214
214
}
@@ -235,8 +235,8 @@ func (ts *OAuthClientTestSuite) TestOAuthServerClientListHandler() {
235
235
236
236
// Check that both clients are in the response (order might vary)
237
237
clientIDs := []string {response .Clients [0 ].ClientID , response .Clients [1 ].ClientID }
238
- assert .Contains (ts .T (), clientIDs , client1 .ClientID )
239
- assert .Contains (ts .T (), clientIDs , client2 .ClientID )
238
+ assert .Contains (ts .T (), clientIDs , client1 .ID . String () )
239
+ assert .Contains (ts .T (), clientIDs , client2 .ID . String () )
240
240
241
241
// Verify client secrets are not included in list response
242
242
for _ , client := range response .Clients {
0 commit comments