Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit 376dfbe

Browse files
remove usage of obsolte LoginAsync
1 parent 01790e7 commit 376dfbe

File tree

4 files changed

+37
-37
lines changed

4 files changed

+37
-37
lines changed

clients/ConformanceTests/CodeIdToken.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public async Task rp_response_type_code_id_token()
3939
options.Flow = OidcClientOptions.AuthenticationFlow.Hybrid;
4040

4141
var client = new OidcClient(options);
42-
var result = await client.LoginAsync();
42+
var result = await client.LoginAsync(new LoginRequest());
4343

4444
result.IsError.Should().BeFalse();
4545
helper.ShowResult(result);
@@ -55,7 +55,7 @@ public async Task rp_scope_userinfo_claims()
5555
options.Flow = OidcClientOptions.AuthenticationFlow.Hybrid;
5656

5757
var client = new OidcClient(options);
58-
var result = await client.LoginAsync();
58+
var result = await client.LoginAsync(new LoginRequest());
5959

6060
result.IsError.Should().BeFalse();
6161
helper.ShowResult(result);
@@ -72,7 +72,7 @@ public async Task rp_nonce_unless_code_flow()
7272
options.Flow = OidcClientOptions.AuthenticationFlow.Hybrid;
7373

7474
var client = new OidcClient(options);
75-
var result = await client.LoginAsync();
75+
var result = await client.LoginAsync(new LoginRequest());
7676

7777
result.IsError.Should().BeFalse();
7878
helper.ShowResult(result);
@@ -89,7 +89,7 @@ public async Task rp_nonce_invalid()
8989
options.Flow = OidcClientOptions.AuthenticationFlow.Hybrid;
9090

9191
var client = new OidcClient(options);
92-
var result = await client.LoginAsync();
92+
var result = await client.LoginAsync(new LoginRequest());
9393

9494
result.IsError.Should().BeTrue();
9595
helper.ShowResult(result);
@@ -105,7 +105,7 @@ public async Task rp_token_endpoint_client_secret_basic()
105105
options.Flow = OidcClientOptions.AuthenticationFlow.Hybrid;
106106

107107
var client = new OidcClient(options);
108-
var result = await client.LoginAsync();
108+
var result = await client.LoginAsync(new LoginRequest());
109109

110110
result.IsError.Should().BeFalse();
111111
helper.ShowResult(result);
@@ -122,7 +122,7 @@ public async Task rp_id_token_aud()
122122
options.Flow = OidcClientOptions.AuthenticationFlow.Hybrid;
123123

124124
var client = new OidcClient(options);
125-
var result = await client.LoginAsync();
125+
var result = await client.LoginAsync(new LoginRequest());
126126

127127
result.IsError.Should().BeTrue();
128128
helper.ShowResult(result);
@@ -139,7 +139,7 @@ public async Task rp_id_token_kid_absent_single_jwks()
139139
options.Flow = OidcClientOptions.AuthenticationFlow.Hybrid;
140140

141141
var client = new OidcClient(options);
142-
var result = await client.LoginAsync();
142+
var result = await client.LoginAsync(new LoginRequest());
143143

144144
result.IsError.Should().BeFalse();
145145
helper.ShowResult(result);
@@ -156,7 +156,7 @@ public async Task rp_id_token_bad_c_hash()
156156
options.Flow = OidcClientOptions.AuthenticationFlow.Hybrid;
157157

158158
var client = new OidcClient(options);
159-
var result = await client.LoginAsync();
159+
var result = await client.LoginAsync(new LoginRequest());
160160

161161
result.IsError.Should().BeTrue();
162162
helper.ShowResult(result);
@@ -173,7 +173,7 @@ public async Task rp_id_token_issuer_mismatch()
173173
options.Flow = OidcClientOptions.AuthenticationFlow.Hybrid;
174174

175175
var client = new OidcClient(options);
176-
var result = await client.LoginAsync();
176+
var result = await client.LoginAsync(new LoginRequest());
177177

178178
result.IsError.Should().BeTrue();
179179
helper.ShowResult(result);
@@ -192,7 +192,7 @@ public async Task rp_id_token_kid_absent_multiple_jwks()
192192
options.Flow = OidcClientOptions.AuthenticationFlow.Hybrid;
193193

194194
var client = new OidcClient(options);
195-
var result = await client.LoginAsync();
195+
var result = await client.LoginAsync(new LoginRequest());
196196

197197
result.IsError.Should().BeFalse();
198198
helper.ShowResult(result);
@@ -209,7 +209,7 @@ public async Task rp_id_token_bad_sig_rs256()
209209
options.Flow = OidcClientOptions.AuthenticationFlow.Hybrid;
210210

211211
var client = new OidcClient(options);
212-
var result = await client.LoginAsync();
212+
var result = await client.LoginAsync(new LoginRequest());
213213

214214
result.IsError.Should().BeTrue();
215215
helper.ShowResult(result);
@@ -226,7 +226,7 @@ public async Task rp_id_token_iat()
226226
options.Flow = OidcClientOptions.AuthenticationFlow.Hybrid;
227227

228228
var client = new OidcClient(options);
229-
var result = await client.LoginAsync();
229+
var result = await client.LoginAsync(new LoginRequest());
230230

231231
result.IsError.Should().BeTrue();
232232
helper.ShowResult(result);
@@ -243,7 +243,7 @@ public async Task rp_id_token_sig_rs256()
243243
options.Flow = OidcClientOptions.AuthenticationFlow.Hybrid;
244244

245245
var client = new OidcClient(options);
246-
var result = await client.LoginAsync();
246+
var result = await client.LoginAsync(new LoginRequest());
247247

248248
result.IsError.Should().BeFalse();
249249
helper.ShowResult(result);
@@ -260,7 +260,7 @@ public async Task rp_id_token_sub()
260260
options.Flow = OidcClientOptions.AuthenticationFlow.Hybrid;
261261

262262
var client = new OidcClient(options);
263-
var result = await client.LoginAsync();
263+
var result = await client.LoginAsync(new LoginRequest());
264264

265265
result.IsError.Should().BeTrue();
266266
helper.ShowResult(result);
@@ -277,7 +277,7 @@ public async Task rp_userinfo_bad_sub_claim()
277277
options.Flow = OidcClientOptions.AuthenticationFlow.Hybrid;
278278

279279
var client = new OidcClient(options);
280-
var result = await client.LoginAsync();
280+
var result = await client.LoginAsync(new LoginRequest());
281281

282282
result.IsError.Should().BeTrue();
283283
helper.ShowResult(result);
@@ -294,7 +294,7 @@ public async Task rp_userinfo_bearer_header()
294294
options.Flow = OidcClientOptions.AuthenticationFlow.Hybrid;
295295

296296
var client = new OidcClient(options);
297-
var result = await client.LoginAsync();
297+
var result = await client.LoginAsync(new LoginRequest());
298298

299299
result.IsError.Should().BeFalse();
300300
helper.ShowResult(result);

clients/ConformanceTests/CodeTests.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public async Task rp_response_type_code()
3838
options.Flow = OidcClientOptions.AuthenticationFlow.AuthorizationCode;
3939

4040
var client = new OidcClient(options);
41-
var result = await client.LoginAsync();
41+
var result = await client.LoginAsync(new LoginRequest());
4242

4343
result.IsError.Should().BeFalse();
4444
helper.ShowResult(result);
@@ -54,7 +54,7 @@ public async Task rp_scope_userinfo_claims()
5454
options.Flow = OidcClientOptions.AuthenticationFlow.AuthorizationCode;
5555

5656
var client = new OidcClient(options);
57-
var result = await client.LoginAsync();
57+
var result = await client.LoginAsync(new LoginRequest());
5858

5959
result.IsError.Should().BeFalse();
6060
helper.ShowResult(result);
@@ -70,7 +70,7 @@ public async Task rp_nonce_invalid()
7070
options.Flow = OidcClientOptions.AuthenticationFlow.AuthorizationCode;
7171

7272
var client = new OidcClient(options);
73-
var result = await client.LoginAsync();
73+
var result = await client.LoginAsync(new LoginRequest());
7474

7575
result.IsError.Should().BeTrue();
7676
helper.ShowResult(result);
@@ -86,7 +86,7 @@ public async Task rp_token_endpoint_client_secret_basic()
8686
options.Flow = OidcClientOptions.AuthenticationFlow.AuthorizationCode;
8787

8888
var client = new OidcClient(options);
89-
var result = await client.LoginAsync();
89+
var result = await client.LoginAsync(new LoginRequest());
9090

9191
result.IsError.Should().BeFalse();
9292
helper.ShowResult(result);
@@ -103,7 +103,7 @@ public async Task rp_id_token_aud()
103103
options.Flow = OidcClientOptions.AuthenticationFlow.AuthorizationCode;
104104

105105
var client = new OidcClient(options);
106-
var result = await client.LoginAsync();
106+
var result = await client.LoginAsync(new LoginRequest());
107107

108108
result.IsError.Should().BeTrue();
109109
helper.ShowResult(result);
@@ -120,7 +120,7 @@ public async Task rp_id_token_kid_absent_single_jwks()
120120
options.Flow = OidcClientOptions.AuthenticationFlow.AuthorizationCode;
121121

122122
var client = new OidcClient(options);
123-
var result = await client.LoginAsync();
123+
var result = await client.LoginAsync(new LoginRequest());
124124

125125
result.IsError.Should().BeFalse();
126126
helper.ShowResult(result);
@@ -140,7 +140,7 @@ public async Task rp_id_token_sig_none()
140140
options.Policy.RequireIdentityTokenSignature = false;
141141

142142
var client = new OidcClient(options);
143-
var result = await client.LoginAsync();
143+
var result = await client.LoginAsync(new LoginRequest());
144144

145145
result.IsError.Should().BeFalse();
146146
helper.ShowResult(result);
@@ -157,7 +157,7 @@ public async Task rp_id_token_issuer_mismatch()
157157
options.Flow = OidcClientOptions.AuthenticationFlow.AuthorizationCode;
158158

159159
var client = new OidcClient(options);
160-
var result = await client.LoginAsync();
160+
var result = await client.LoginAsync(new LoginRequest());
161161

162162
result.IsError.Should().BeTrue();
163163
helper.ShowResult(result);
@@ -176,7 +176,7 @@ public async Task rp_id_token_kid_absent_multiple_jwks()
176176
options.Flow = OidcClientOptions.AuthenticationFlow.AuthorizationCode;
177177

178178
var client = new OidcClient(options);
179-
var result = await client.LoginAsync();
179+
var result = await client.LoginAsync(new LoginRequest());
180180

181181
result.IsError.Should().BeFalse();
182182
helper.ShowResult(result);
@@ -193,7 +193,7 @@ public async Task rp_id_token_bad_sig_rs256()
193193
options.Flow = OidcClientOptions.AuthenticationFlow.AuthorizationCode;
194194

195195
var client = new OidcClient(options);
196-
var result = await client.LoginAsync();
196+
var result = await client.LoginAsync(new LoginRequest());
197197

198198
result.IsError.Should().BeTrue();
199199
helper.ShowResult(result);
@@ -210,7 +210,7 @@ public async Task rp_id_token_iat()
210210
options.Flow = OidcClientOptions.AuthenticationFlow.AuthorizationCode;
211211

212212
var client = new OidcClient(options);
213-
var result = await client.LoginAsync();
213+
var result = await client.LoginAsync(new LoginRequest());
214214

215215
result.IsError.Should().BeTrue();
216216
helper.ShowResult(result);
@@ -227,7 +227,7 @@ public async Task rp_id_token_sig_rs256()
227227
options.Flow = OidcClientOptions.AuthenticationFlow.AuthorizationCode;
228228

229229
var client = new OidcClient(options);
230-
var result = await client.LoginAsync();
230+
var result = await client.LoginAsync(new LoginRequest());
231231

232232
result.IsError.Should().BeFalse();
233233
helper.ShowResult(result);
@@ -244,7 +244,7 @@ public async Task rp_id_token_sub()
244244
options.Flow = OidcClientOptions.AuthenticationFlow.AuthorizationCode;
245245

246246
var client = new OidcClient(options);
247-
var result = await client.LoginAsync();
247+
var result = await client.LoginAsync(new LoginRequest());
248248

249249
result.IsError.Should().BeTrue();
250250
helper.ShowResult(result);
@@ -261,7 +261,7 @@ public async Task rp_userinfo_bad_sub_claim()
261261
options.Flow = OidcClientOptions.AuthenticationFlow.AuthorizationCode;
262262

263263
var client = new OidcClient(options);
264-
var result = await client.LoginAsync();
264+
var result = await client.LoginAsync(new LoginRequest());
265265

266266
result.IsError.Should().BeTrue();
267267
helper.ShowResult(result);
@@ -278,7 +278,7 @@ public async Task rp_userinfo_bearer_header()
278278
options.Flow = OidcClientOptions.AuthenticationFlow.AuthorizationCode;
279279

280280
var client = new OidcClient(options);
281-
var result = await client.LoginAsync();
281+
var result = await client.LoginAsync(new LoginRequest());
282282

283283
result.IsError.Should().BeFalse();
284284
helper.ShowResult(result);

clients/ConformanceTests/ConfigTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public async Task rp_discovery_jwks_uri_keys()
2929
options.Flow = OidcClientOptions.AuthenticationFlow.AuthorizationCode;
3030

3131
var client = new OidcClient(options);
32-
var result = await client.LoginAsync();
32+
var result = await client.LoginAsync(new LoginRequest());
3333

3434
result.IsError.Should().BeFalse();
3535
helper.ShowResult(result);
@@ -47,7 +47,7 @@ public async Task rp_discovery_issuer_not_matching_config()
4747
options.Flow = OidcClientOptions.AuthenticationFlow.AuthorizationCode;
4848

4949
var client = new OidcClient(options);
50-
var result = await client.LoginAsync();
50+
var result = await client.LoginAsync(new LoginRequest());
5151

5252
result.IsError.Should().BeFalse();
5353
helper.ShowResult(result);
@@ -64,7 +64,7 @@ public async Task rp_discovery_openid_configuration()
6464
options.Flow = OidcClientOptions.AuthenticationFlow.AuthorizationCode;
6565

6666
var client = new OidcClient(options);
67-
var result = await client.LoginAsync();
67+
var result = await client.LoginAsync(new LoginRequest());
6868

6969
result.IsError.Should().BeFalse();
7070
helper.ShowResult(result);
@@ -84,7 +84,7 @@ public async Task rp_id_token_sig_none()
8484
options.Policy.RequireIdentityTokenSignature = false;
8585

8686
var client = new OidcClient(options);
87-
var result = await client.LoginAsync();
87+
var result = await client.LoginAsync(new LoginRequest());
8888

8989
result.IsError.Should().BeFalse();
9090
helper.ShowResult(result);
@@ -104,7 +104,7 @@ public async Task rp_key_rotation_op_sign_key_native()
104104
await helper.ResetKeyRotation();
105105
var client = new OidcClient(options);
106106

107-
var result = await client.LoginAsync();
107+
var result = await client.LoginAsync(new LoginRequest());
108108
result.IsError.Should().BeFalse();
109109
helper.ShowResult(result);
110110
}

clients/ConsoleClientWithBrowser/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ private static async Task SignIn()
5555
options.LoggerFactory.AddSerilog(serilog);
5656

5757
_oidcClient = new OidcClient(options);
58-
var result = await _oidcClient.LoginAsync();
58+
var result = await _oidcClient.LoginAsync(new LoginRequest());
5959

6060
ShowResult(result);
6161
await NextSteps(result);

0 commit comments

Comments
 (0)